Correct EOF handling on client stdin

Previously we would end in an infinite loop which might be the cause
of #15.
This commit is contained in:
Marc André Tanner 2018-03-17 10:32:40 +01:00
parent 315338a572
commit fdbda93131
1 changed files with 3 additions and 0 deletions

View File

@ -129,6 +129,9 @@ static int client_mainloop(void) {
} else if (!(client.flags & CLIENT_READONLY)) {
client_send_packet(&pkt);
}
} else if (len == 0) {
debug("client-stdin: EOF\n");
return -1;
}
}
}