Permalink
Browse files

ofxNetwork: disconect on EABORTCONN

  • Loading branch information...
1 parent fa65aff commit 736021c1859bec8d9c34dbef7075934cf2d2b7e6 @arturoc arturoc committed Nov 10, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −0 addons/ofxNetwork/src/ofxNetworkUtils.h
  2. +1 −1 addons/ofxNetwork/src/ofxTCPManager.cpp
@@ -33,6 +33,7 @@
#define EALREADY WSAEALREADY
#define ENOPROTOOPT WSAENOPROTOOPT
#define EMSGSIZE WSAEMSGSIZE
+#define ECONNABORTED WSAECONNABORTED
#endif
@@ -274,7 +274,7 @@ int ofxTCPManager::SendAll(const char* pBuff, const int iSize)
if (GetTickCount() - timestamp > m_dwTimeoutSend * 1000) return SOCKET_TIMEOUT;
}
- if(err == EPIPE || err == ECONNRESET){ Close(); return 0; }
+ if(err == EPIPE || err == ECONNRESET || err == ECONNABORTED ){ Close(); return 0; }
return ret==-1 && bytesleft == iSize?SOCKET_ERROR:total;
}

0 comments on commit 736021c

Please sign in to comment.