summaryrefslogtreecommitdiff
path: root/HTTPcode.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2025-08-17 22:31:33 +0100
committerDave Hibberd <hibby@debian.org>2025-08-17 22:31:33 +0100
commit27d95452b1e341f55154c967320d1d8920b089c0 (patch)
tree5c9ce843e16802ef6dcdfc04ac8ea435b382564c /HTTPcode.c
parentd97d9d821bce50846d1f31290fffc3a447862bce (diff)
parente925e16114a18c7a0db4c016c176a149f5f67ab3 (diff)
Update upstream source from tag 'upstream/6.0.24.82+repack'
Update to upstream version '6.0.24.82+repack' with Debian dir a145ad04db4f8d413df5d1fe2c051f9842774c35
Diffstat (limited to 'HTTPcode.c')
-rw-r--r--HTTPcode.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/HTTPcode.c b/HTTPcode.c
index 3145d80..385eca2 100644
--- a/HTTPcode.c
+++ b/HTTPcode.c
@@ -4839,7 +4839,14 @@ void ProcessWebmailWebSockThread(void * conn)
Sent = send(sockptr->socket, _REPLYBUFFER, ReplyLen, 0);
- while (Sent != ReplyLen && Loops++ < 3000) // 100 secs max
+ if (Sent == -1) // Connecton lost
+ {
+ closesocket(sockptr->socket);
+ free(conn);
+ return;
+ }
+
+ while (Sent != ReplyLen && Loops++ < 3000) // 90 secs max
{
if (Sent > 0) // something sent
{
@@ -4885,11 +4892,16 @@ void ProcessWebmailWebSockThread(void * conn)
CloseHandle(hPipe);
- // ?? do we need a thread to handle write which may block
-
Sent = send(sockptr->socket, Reply, ReplyLen, 0);
- while (Sent != ReplyLen && Loops++ < 3000) // 100 secs max
+ if (Sent == -1) // Connecton lost
+ {
+ free(conn);
+ closesocket(sockptr->socket);
+ return;
+ }
+
+ while (Sent != ReplyLen && Loops++ < 3000) // 90 secs max
{
// Debugprintf("%d out of %d sent %d Loops", Sent, InputLen, Loops);