Hi there,
I’ve been fighting a problem for a few days now and I’m about out of ideas.
In short, this is the story:
I’m writing a client for a server, which uses plain TCP sockets to connect. The receiving of data happens asynchronous, so it happens in a separate thread.
It works great, but every now and then (it happens very rarely), some data sent by the server to the client seems to get lost, leaving the client in a state where it just loses track of the protocol.
One possible way the data could be screwed if 2 threads try to read from the socket simultaneously, so I’ve been very careful that this can’t happen and I’m pretty sure this doesn’t happen.
I’ve asked the server guys to put a trace on what the’re sending back to the client, and that seems to be okay, even if the client lost some data.
Has anyone of you experienced something like this? Any ideas?
Since I can’t post source code (I’m not allowed to), I’m basically just trying to get some fresh ideas to be able to track down the problem.
Cheers,
Erik