Go Down

Topic: What does client.stop() do and how does if(client) work from the server side? (Read 276 times) previous topic - next topic


I think it is the else. It may not execute at the right time.

I think you're right. I removed the else and now it's working as it should. Previously, after the the server exhausted the bytes on the rx socket, naturally, the else if would not evaluated until the next iteration of the loop. I guess that extra time caused it to fail sending/client receiving the disconnect message.

Go Up