summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src/jabber_thread.cpp')
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index cfe2742631..ec4c10fbfc 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -1987,6 +1987,7 @@ void ThreadData::shutdown(void)
{
if (s)
Netlib_Shutdown(s);
+ bShutdown = true;
}
int ThreadData::recv(char* buf, size_t len)
@@ -2000,7 +2001,7 @@ int ThreadData::recv(char* buf, size_t len)
nls.dwTimeout = INFINITE;
nls.hReadConns[0] = s;
int nSelRes = Netlib_Select(&nls);
- if (nSelRes == SOCKET_ERROR) // error
+ if (nSelRes == SOCKET_ERROR || bShutdown) // error
return SOCKET_ERROR;
}