diff options
| author | Dave Hibberd <hibby@debian.org> | 2025-08-17 22:31:27 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2025-08-17 22:31:27 +0100 |
| commit | e925e16114a18c7a0db4c016c176a149f5f67ab3 (patch) | |
| tree | f7e3ceca5c9120904025448ce923b47c926d5b53 /HTTPcode.c | |
| parent | 3e1cbdfa4d40ec5e6fba35446501ba933ae1451e (diff) | |
New upstream version 6.0.24.82+repackupstream/6.0.24.82+repack
Diffstat (limited to 'HTTPcode.c')
| -rw-r--r-- | HTTPcode.c | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -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);
|
