diff options
author | Marc Laukien <marc@zeroc.com> | 2004-01-18 17:59:13 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2004-01-18 17:59:13 +0000 |
commit | c5aee1ab16937ddb5e90458da045a4664344d201 (patch) | |
tree | b7a80ef70b9a528220913071819da19cdb7d49f3 /cpp/src/Ice/Network.cpp | |
parent | fix (diff) | |
download | ice-c5aee1ab16937ddb5e90458da045a4664344d201.tar.bz2 ice-c5aee1ab16937ddb5e90458da045a4664344d201.tar.xz ice-c5aee1ab16937ddb5e90458da045a4664344d201.zip |
fix
Diffstat (limited to 'cpp/src/Ice/Network.cpp')
-rw-r--r-- | cpp/src/Ice/Network.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index c25ed247649..86a45ebe8f1 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -122,9 +122,11 @@ IceInternal::connectionLost() int error = WSAGetLastError(); return error == WSAECONNRESET || error == WSAESHUTDOWN || + error == WSAENOTCONN || error == WSAECONNABORTED; #else return errno == ECONNRESET || + errno == ENOTCONN || errno == ESHUTDOWN || errno == ECONNABORTED || errno == EPIPE; @@ -211,6 +213,22 @@ IceInternal::shutdownSocket(SOCKET fd) { if(shutdown(fd, SHUT_WR) == SOCKET_ERROR) { + // + // Ignore errors indicating that we are shutdown already. + // +#ifdef _WIN32 + int error = WSAGetLastError(); + if(error == WSAENOTCONN) + { + return; + } +#else + if(errno == ENOTCONN) + { + return; + } +#endif + SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; |