From 53a026eb4e25313e9f82127a1851d428d0725126 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Tue, 14 Apr 2009 13:35:10 +0000 Subject: [PATCH] handle NOTCONN. git-svn-id: file:///svn/unbound/trunk@1599 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 1 + util/netevent.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/doc/Changelog b/doc/Changelog index 1a17e560d..fc21eba79 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,7 @@ - bug #245: fix munin plugin, perform cleanup of stale lockfiles. - makedist.sh; better help text. - cache-min-ttl option and tests. + - mingw detect error condition on TCP sockets (NOTCONN). 9 April 2009: Wouter - Fix for removal of RSASHA256_NSEC3 protonumber from ldns. diff --git a/util/netevent.c b/util/netevent.c index 7989f9c2f..25215a3bb 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -876,6 +876,8 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c) return 1; log_err("tcp writev: %s", strerror(errno)); #else + if(WSAGetLastError() == WSAENOTCONN) + return 1; if(WSAGetLastError() == WSAEINPROGRESS) return 1; if(WSAGetLastError() == WSAEWOULDBLOCK) {