mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-16 10:29:30 +00:00
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:
1 parent
e0cebc33b1
commit
d46ff8e396
1 file changed
+1
-1
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user