diff options
author | Dirk Engling <erdgeist@erdgeist.org> | 2021-04-21 20:14:58 +0200 |
---|---|---|
committer | Dirk Engling <erdgeist@erdgeist.org> | 2021-04-21 20:14:58 +0200 |
commit | 1a349bfa4346acd18b8646ec2eaa0f237a83e3f3 (patch) | |
tree | c7a9d6e6dc2a143d3b4bd676f6acc09289a00f3d | |
parent | bfc398182fb51543a7cf37033ef8d8fa18af5e7a (diff) |
Add a handler for the EAGAIN reason code to iob_send
-rw-r--r-- | opentracker.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/opentracker.c b/opentracker.c index 1c729cf..441639a 100644 --- a/opentracker.c +++ b/opentracker.c | |||
@@ -204,7 +204,11 @@ static void handle_read( const int64 sock, struct ot_workstruct *ws ) { | |||
204 | 204 | ||
205 | static void handle_write( const int64 sock ) { | 205 | static void handle_write( const int64 sock ) { |
206 | struct http_data* cookie=io_getcookie( sock ); | 206 | struct http_data* cookie=io_getcookie( sock ); |
207 | if( !cookie || ( iob_send( sock, &cookie->batch ) <= 0 ) ) | 207 | if( cookie ) { |
208 | int64 res = iob_send( sock, &cookie->batch ); | ||
209 | if (res == 0 || res == -3) | ||
210 | handle_dead( sock ); | ||
211 | } else | ||
208 | handle_dead( sock ); | 212 | handle_dead( sock ); |
209 | } | 213 | } |
210 | 214 | ||