From 40f84cd0924958c619d434a9147e7ed2b6abaadc Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 21 Jun 2013 03:34:27 +0000 Subject: fdmap: do not warn on ENOTCONN due to unavoidable race A client may disconnect at any time, so shutdown may fail harmlessly with ENOTCONN. --- fdmap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fdmap.c b/fdmap.c index 8cb9954..823cf9f 100644 --- a/fdmap.c +++ b/fdmap.c @@ -230,8 +230,9 @@ static size_t expire_http(struct mog_fd *mfd, uint32_t msec) tcp_timedout(&info, msec)) { if (shutdown(mfd->fd, SHUT_RDWR) == 0) return 1; - - syslog(LOG_WARNING, "BUG? expire_http,shutdown: %m"); + if (errno != ENOTCONN) + syslog(LOG_WARNING, + "BUG? expire_http,shutdown: %m"); } } else { assert(errno != EINVAL && "BUG: getsockopt: EINVAL"); -- cgit v1.2.3-24-ge0c7