diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-06-21 03:34:27 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-06-25 21:34:09 +0000 |
commit | 40f84cd0924958c619d434a9147e7ed2b6abaadc (patch) | |
tree | d29f1afb046d27f1308294e772d226cc06e0d8c6 | |
parent | 9f43d3eb8cf6a156108c714551a7eb68472e17a4 (diff) | |
download | cmogstored-40f84cd0924958c619d434a9147e7ed2b6abaadc.tar.gz |
A client may disconnect at any time, so shutdown may fail harmlessly with ENOTCONN.
-rw-r--r-- | fdmap.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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"); |