From: Alan T. DeKok Date: Thu, 21 Jun 2018 19:20:23 +0000 (-0400) Subject: handle EWOULDBLOCK X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86fd18ff6d10e7edf683ba9bed787ee92c2acbaa;p=thirdparty%2Ffreeradius-server.git handle EWOULDBLOCK --- diff --git a/src/modules/proto_control/proto_control_unix.c b/src/modules/proto_control/proto_control_unix.c index 0f9d7bda948..b92bcc49ef2 100644 --- a/src/modules/proto_control/proto_control_unix.c +++ b/src/modules/proto_control/proto_control_unix.c @@ -156,7 +156,14 @@ static ssize_t mod_read(void *instance, void **packet_ctx, fr_time_t **recv_time */ data_size = fr_conduit_read_async(inst->sockfd, &conduit, buffer, buffer_len, leftover); if (data_size < 0) { - DEBUG2("proto_control_tcp got read error %zd: %s", data_size, fr_strerror()); +#ifdef EWOULDBLOCK + if (errno == EWOULDBLOCK) return 0; +#endif +#ifdef EAGAIN + if (errno == EAGAIN) return 0; +#endif + + DEBUG2("proto_control_unix got read error %zd: %s", data_size, fr_strerror()); return data_size; }