Add a handler for the EAGAIN reason code to iob_send

This commit is contained in:
Dirk Engling 2021-04-21 20:14:58 +02:00
parent bfc398182f
commit 1a349bfa43

View File

@ -204,7 +204,11 @@ static void handle_read( const int64 sock, struct ot_workstruct *ws ) {
static void handle_write( const int64 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 );
}