abduco

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit fdbda9313163301ce0157f1b8eea229e6b6a6021
parent 315338a572ded75b278608612e753f7e9abc7d19
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Sat, 17 Mar 2018 10:32:40 +0100

Correct EOF handling on client stdin

Previously we would end in an infinite loop which might be the cause
of #15.

Diffstat:
client.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/client.c b/client.c @@ -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; } } }