diff options
author | Aki <please@ignore.pl> | 2021-08-22 16:03:17 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2021-08-22 16:03:17 +0200 |
commit | 31c614d6916c5573eb11a25cce996c5e3afbb5f0 (patch) | |
tree | 40f52769f19652957165cd66d299c8eeea507bad /plop.c | |
parent | fe94acc29d93b766eac79d2f9ded6874919eadfa (diff) | |
download | plop-31c614d6916c5573eb11a25cce996c5e3afbb5f0.zip plop-31c614d6916c5573eb11a25cce996c5e3afbb5f0.tar.gz plop-31c614d6916c5573eb11a25cce996c5e3afbb5f0.tar.bz2 |
Fixed poll behaviour
Diffstat (limited to 'plop.c')
-rw-r--r-- | plop.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -241,6 +241,12 @@ int plop_handle_server(const int server) } } + if (-1 == fcntl(client, F_SETFL, fcntl(client, F_GETFL, 0) | O_NONBLOCK)) + { + close(client); + return 0; // TODO: Revisit error handling in server. + } + struct connection * connection = connection_new(client); if (NULL == connection) return -1; |