From d6d4fb0668638ed1a2fc4cdff7940fcc3bd7c21d Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 26 May 2018 00:25:59 +0200 Subject: Tell libowfat about EWOULDBLOCK conditions --- opentracker.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'opentracker.c') diff --git a/opentracker.c b/opentracker.c index 90d3324..09010c7 100644 --- a/opentracker.c +++ b/opentracker.c @@ -239,6 +239,7 @@ static void handle_accept( const int64 serversocket ) { tai_unix( &(t.sec), (g_now_seconds + OT_CLIENT_TIMEOUT) ); io_timeout( sock, t ); } + io_eagain(serversocket); } static void * server_mainloop( void * args ) { @@ -269,9 +270,10 @@ static void * server_mainloop( void * args ) { handle_accept( sock ); else if( (intptr_t)cookie == FLAG_UDP ) handle_udp6( sock, &ws ); - else if( (intptr_t)cookie == FLAG_SELFPIPE ) + else if( (intptr_t)cookie == FLAG_SELFPIPE ) { io_tryread( sock, ws.inbuf, G_INBUF_SIZE ); - else + fprintf(stderr, "pipe\n"); + } else handle_read( sock, &ws ); } -- cgit v1.2.3