Add a handler for the EAGAIN reason code to iob_send

dynamic-accesslists
Dirk Engling 4 years ago
parent bfc398182f
commit 1a349bfa43

@ -204,7 +204,11 @@ static void handle_read( const int64 sock, struct ot_workstruct *ws ) {
static void handle_write( const int64 sock ) { static void handle_write( const int64 sock ) {
struct http_data* cookie=io_getcookie( sock ); struct http_data* cookie=io_getcookie( sock );
if( !cookie || ( iob_send( sock, &cookie->batch ) <= 0 ) ) if( cookie ) {
int64 res = iob_send( sock, &cookie->batch );
if (res == 0 || res == -3)
handle_dead( sock );
} else
handle_dead( sock ); handle_dead( sock );
} }

Loading…
Cancel
Save