diff options
author | Dirk Engling <erdgeist@erdgeist.org> | 2021-05-09 00:02:13 +0200 |
---|---|---|
committer | Dirk Engling <erdgeist@erdgeist.org> | 2021-05-09 00:02:13 +0200 |
commit | 99544a10306382c285e1f3166b7dcb8686ef4a2d (patch) | |
tree | d0c8038e67bc947ff57405b20757a3c015e1269a /opentracker.c | |
parent | e33efb50867d74ca2684739bf3a5ff4a284689ec (diff) |
Handle eagain case in trywrite
Diffstat (limited to 'opentracker.c')
-rw-r--r-- | opentracker.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/opentracker.c b/opentracker.c index 7e426d2..32b3364 100644 --- a/opentracker.c +++ b/opentracker.c | |||
@@ -170,9 +170,9 @@ static void handle_dead( const int64 sock ) { | |||
170 | 170 | ||
171 | static void handle_read( const int64 sock, struct ot_workstruct *ws ) { | 171 | static void handle_read( const int64 sock, struct ot_workstruct *ws ) { |
172 | struct http_data* cookie = io_getcookie( sock ); | 172 | struct http_data* cookie = io_getcookie( sock ); |
173 | ssize_t byte_count; | 173 | ssize_t byte_count = io_tryread( sock, ws->inbuf, G_INBUF_SIZE ); |
174 | 174 | ||
175 | if( ( byte_count = io_tryread( sock, ws->inbuf, G_INBUF_SIZE ) ) <= 0 ) { | 175 | if( byte_count == 0 || byte_count == -3 ) { |
176 | handle_dead( sock ); | 176 | handle_dead( sock ); |
177 | return; | 177 | return; |
178 | } | 178 | } |