I've found that BattlEyeClient will occasionally throw an unhandled ObjectDisposedException in the Receive method, caused by accessing socket.Available when the socket has been disconnected.
I think this happens when the timeoutServer value causes Disconnect to be called, which closes the socket and the receive thread then continues and calls socket.Available. I fixed it by adding another check of Socket.Connected:
if (socket.Connected && packetQueue.Count > 0 && socket.Available == 0)
I've found that BattlEyeClient will occasionally throw an unhandled ObjectDisposedException in the Receive method, caused by accessing socket.Available when the socket has been disconnected.
I think this happens when the timeoutServer value causes Disconnect to be called, which closes the socket and the receive thread then continues and calls socket.Available. I fixed it by adding another check of Socket.Connected:
if (socket.Connected && packetQueue.Count > 0 && socket.Available == 0)