redirect: Make sure example application does not exit on len==0

We want to continue running the event loop until it is exited properly,
not if the callback for stdin detects a short read.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-10-21 19:54:00 +02:00
1 parent e0cebc33b1
commit d46ff8e396
1 file changed
+1 -1
+1 -1
View File
@@ -36,7 +36,7 @@ void process_stdin(uev_t *w, void *arg, int events)
if (len == 0) {
fprintf(stderr, "Connection closed.\n");
exit(0);
return;
}
fprintf(stdout, "--- read %d bytes\n", len);