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
Branches
Tags
No related merge requests found
Pipeline #7123 passed
......@@ -190,8 +190,10 @@ function full_send(sock, str)
var sret;
do {
if (sock.poll(60, true) != 1)
break;
sret = sock.send(str.substr(sent));
if (sret == undefined)
if (sret == undefined || sret == 0)
break;
sent += sret;
} 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