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.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 78d696d6f4..78f9150aaf 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -1992,25 +1992,15 @@ void ThreadData::shutdown(void)
Netlib_Shutdown(s);
}
-int ThreadData::recvws(char* buf, size_t len, int flags)
+int ThreadData::recv(char* buf, size_t len)
{
if (this == nullptr)
return 0;
- return proto->WsRecv(s, buf, (int)len, flags);
-}
-
-int ThreadData::recv(char* buf, size_t len)
-{
if (useZlib)
return zlibRecv(buf, (long)len);
- return recvws(buf, len, MSG_DUMPASTEXT);
-}
-
-int ThreadData::sendws(char* buf, size_t bufsize, int flags)
-{
- return proto->WsSend(s, buf, (int)bufsize, flags);
+ return proto->WsRecv(s, buf, len, MSG_DUMPASTEXT);
}
int ThreadData::send(char* buf, int bufsize)
@@ -2027,7 +2017,10 @@ int ThreadData::send(char* buf, int bufsize)
if (useZlib)
result = zlibSend(buf, bufsize);
else
- result = sendws(buf, bufsize, MSG_DUMPASTEXT);
+ result = proto->WsSend(s, buf, bufsize, MSG_DUMPASTEXT);
+
+ if (result == SOCKET_ERROR)
+ close();
ReleaseMutex(iomutex);