summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2004-01-18 17:59:13 +0000
committerMarc Laukien <marc@zeroc.com>2004-01-18 17:59:13 +0000
commitc5aee1ab16937ddb5e90458da045a4664344d201 (patch)
treeb7a80ef70b9a528220913071819da19cdb7d49f3 /cpp/src
parentfix (diff)
downloadice-c5aee1ab16937ddb5e90458da045a4664344d201.tar.bz2
ice-c5aee1ab16937ddb5e90458da045a4664344d201.tar.xz
ice-c5aee1ab16937ddb5e90458da045a4664344d201.zip
fix
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Network.cpp18
-rw-r--r--cpp/src/IcePatch/Server.cpp2
2 files changed, 19 insertions, 1 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;
diff --git a/cpp/src/IcePatch/Server.cpp b/cpp/src/IcePatch/Server.cpp
index df0ddf5aa3d..ef4def210db 100644
--- a/cpp/src/IcePatch/Server.cpp
+++ b/cpp/src/IcePatch/Server.cpp
@@ -157,7 +157,7 @@ IcePatch::Updater::run()
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
- while(!_destroy)
+ while(!_destroy && !Application::interrupted())
{
try
{