diff options
-rw-r--r-- | RELNOTES | 6 | ||||
-rw-r--r-- | omapip/dispatch.c | 11 |
2 files changed, 15 insertions, 2 deletions
@@ -161,6 +161,12 @@ work on other platforms. Please report any problems and suggested fixes to dhcpd.conf file as desired. [ISC-Bugs #19337] +- Check the status value when trying to read from a connection to + see if it may have been closed. If it appears closed don't try + to read from it again. This avoids a potential busy-wait like + loop when the peer names are mismatched. + [ISC-Bugs #31231] + Changes since 4.2.4rc2 - None diff --git a/omapip/dispatch.c b/omapip/dispatch.c index 4039659a..e6aae453 100644 --- a/omapip/dispatch.c +++ b/omapip/dispatch.c @@ -171,8 +171,15 @@ omapi_iscsock_cb(isc_task_t *task, if ((flags == ISC_SOCKFDWATCH_READ) && (obj->reader != NULL) && (obj->inner != NULL)) { - obj->reader(obj->inner); - /* We always ask for more when reading */ + status = obj->reader(obj->inner); + /* + * If we are shutting down (basically tried to + * read and got no bytes) we don't need to try + * again. + */ + if (status == ISC_R_SHUTTINGDOWN) + return (0); + /* Otherwise We always ask for more when reading */ return (1); } else if ((flags == ISC_SOCKFDWATCH_WRITE) && (obj->writer != NULL) && |