summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opentracker.c6
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
205static void handle_write( const int64 sock ) { 205static 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