RDM6300 RFID - W5100 failing to connect on certain rfid tags

I have a weird problem, I’ve been using a combination of the RDM6300 RFID reader and the W5100 ethernet adapter to transmit tags to our sql server and respond with a simple string to authorise access to a lock or equipment. Been using this setup for a couple years with over a dozen of these units deployed.
Every now an then, a RFID tag goes bad. When someone goes to read their RFID tag, the program runs and decodes the tag without any problem but when it gets to the line “if (client.connect(server, 8383))” it will hang until reset. We have dozen of RFID tags in use and works like a charm %99 of the time. I was wondering if the tags die over time but testing some of the problematic tags on a bench test rfid reader and arduino, they work fine. This has been a bug I’ve been chasing for years now and really would like to squish.

// RFID reader
#include <SoftwareSerial.h>
SoftwareSerial RFID(2, 3); // RX only, 3 (TX) not in use

// *UNO/Nano* ENC28J60/W5100 CS/SS > 10, SI/MO > 11, SO/MI > 12, SCK/CK > 13
// *MEGA* ENC28J60/W5100 CS/SS > 53/10, SI/MO > 51, SO/MI > 50, SCK/CK > 52
#include <Ethernet.h> //W5100
byte mac[] = { 0xBC, 0xAD, 0x28, 0x3D, 0xE1, 0xD1 };
EthernetClient client;
char server[] = "192.168.50.20";
int NicResetPin = 9;

const int latch = 7; // latch relay
const int ledGreen = 6; // status LED green pin
const int ledRed = 5;  // status LED red pin

unsigned long previousMillis = 0; // last time update

void setup()
{
  pinMode(latch, OUTPUT);
  pinMode(ledGreen, OUTPUT);
  pinMode(ledRed, OUTPUT);
  digitalWrite(latch, HIGH); //Off
  digitalWrite(ledRed, LOW); //On
  digitalWrite(ledGreen, HIGH); //Off

  RFID.begin(9600);    // start serial to RFID reader
  pinMode(NicResetPin, OUTPUT);
  ethernetReset();
}

void loop() {

  if (millis() - previousMillis > 1000) {
    previousMillis = millis();

    //Blink bi-colour led
    digitalWrite(ledRed, HIGH); //Off - From previous cycle
    digitalWrite(ledGreen, HIGH); //Off - From previous cycle
    digitalWrite(ledRed, LOW); //On
    delay(100);
    digitalWrite(ledRed, HIGH); //Off
    digitalWrite(ledGreen, LOW); //On
  }

  if (RFID.available() > 0) {

    digitalWrite(ledGreen, HIGH); //Off

    char r;
    char decimal[10];
    long int rfid_num;
    String reading;

    delay(50);
    for (int z = 0 ; z < 11 ; z++) // read the rest of the tag
    {
      r = RFID.read();
      reading += r;
    }
    reading.remove(0, 5);
    reading.remove(6, 3);
    reading = "0x" + reading;
    reading.toCharArray(decimal, 10);
    rfid_num = strtol (decimal, NULL, 0); // convert to int

      String responce = connectAndRead(String (rfid_num)); //connect to the server and read the output

      if (responce == "0") {
        digitalWrite(ledRed, LOW); //On
        delay(5000);
      }

      if (responce == "1") {
        digitalWrite(ledGreen, LOW); //On
        digitalWrite(latch, LOW); //Unlock
        delay(2000);
        digitalWrite(latch, HIGH); //Lock
      }
    
    delay(250);

    while (RFID.available() > 0) { // Do this after everyting else to prevent mutiple reads from RFID - Needs 5sec of something before this.
      RFID.read(); //read it into arduino buffer
      RFID.flush(); //then flush it
    }
  }
}

String connectAndRead(String rfid_num) {

  char inString[2]; // string for incoming serial data
  memset( &inString, 0, sizeof(inString) );

  if (client.connect(server, 8383)) {
    client.print(F("GET /rfid/dooraccess.php?reader=david_office_access&rfid_num="));
    client.println(rfid_num);
    clientFin();

    while (true) {
      if (client.available()) {
        char c = client.read();
        inString[0] = c;
        //got what we need here! We can disconnect now
        clientFlushStop();
        return inString;
      }
    }
  } else {
    clientFlushStop();
    ethernetReset();
    return "0";
  }
}

void clientFin() {
  client.println(F(" HTTP/1.1"));
  client.print(F("Host: "));
  client.println(server);
  client.println(F("Connection: close"));
  client.println();
  client.println();
}

void clientFlushStop() {
  delay(50);
  client.flush();
  delay(50);
  client.stop();
}

void ethernetReset() {
  digitalWrite(NicResetPin, LOW);
  delay(250);
  digitalWrite(NicResetPin, HIGH);
  delay(250);
  Ethernet.begin(mac);
}