ofxTCPManager close connection error

im using the ofxNetwork tcp addon in a project but sometimes when i close my client app the server starts throwing a lot of messages and stop accepting new connections , it looks to me like is not closing properly the connection but to be honest i dont understand the code of ofxTCPManager.cpp

i changed ofxTCPManager.cpp line 277 :

if(err == EPIPE || err == ECONNRESET ){ Close(); return 0; }  

for this :

if(err == EPIPE || err == ECONNRESET || err == 10053 ){ Close(); return 0; }   

this seems to fix the problem for my particular case but could someone check if this is the correct way to fix it ?

I think that’s because the client doesn’t send a finish message and the connection just times out. I’m surprised no one on Windows has run into this before though?

There’s a little more info here http://support.ipswitch.com/kb/WSK-19980702-EM02.htm but I think your solution should be fine.

im using my own java app to connect to the c++ tcp server so i guess the error doesnt occours when using the tcp client addon of openframeworks.

Ah. Well, you can always have your app call closesocket() http://msdn.microsoft.com/en-us/library/windows/desktop/ms737582(v=vs.85.aspx if you want to make it friendlier. :slight_smile:

it seems we are missing that error condition on the detection of a closed connection. i’ll add it to github

Cool , one bug less ;D