Skip to content
Snippets Groups Projects
Commit 292028f3 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

poll() for write, and break on sock.send() returning zero

Should fix log-padding infinite loop.
parent f4ea0c75
No related branches found
No related tags found
No related merge requests found
Pipeline #7123 passed
...@@ -190,8 +190,10 @@ function full_send(sock, str) ...@@ -190,8 +190,10 @@ function full_send(sock, str)
var sret; var sret;
do { do {
if (sock.poll(60, true) != 1)
break;
sret = sock.send(str.substr(sent)); sret = sock.send(str.substr(sent));
if (sret == undefined) if (sret == undefined || sret == 0)
break; break;
sent += sret; sent += sret;
} while(sent < str.length); } while(sent < str.length);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment