]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix that tcp sticky events are removed for closed fd on windows.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 May 2018 10:02:06 +0000 (10:02 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 May 2018 10:02:06 +0000 (10:02 +0000)
git-svn-id: file:///svn/unbound/trunk@4694 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
util/netevent.c

index 7046f9c9fd1b3d5be5cfb93f4eb653ef5da6de4d..05dc9461734c5e8f659ec9f62161cf54bb42a9a4 100644 (file)
@@ -1,6 +1,7 @@
 25 May 2018: Wouter
        - For TCP and TLS connections that don't establish, perform address
          update in infra cache, so future selections can exclude them.
+       - Fix that tcp sticky events are removed for closed fd on windows.
 
 24 May 2018: Wouter
        - Fix that libunbound can do DNS-over-TLS, when configured.
index 3c3537856e882ef93d9d397f8cc191ef232bab51..8390d35db86387c467079e19ab7b58eec8a228a7 100644 (file)
@@ -2900,10 +2900,14 @@ comm_point_close(struct comm_point* c)
 {
        if(!c)
                return;
-       if(c->fd != -1)
+       if(c->fd != -1) {
                if(ub_event_del(c->ev->ev) != 0) {
                        log_err("could not event_del on close");
                }
+               /* delete sticky events for the fr, it gets closed */
+               ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_READ);
+               ub_winsock_tcp_wouldblock(c->ev->ev, UB_EV_WRITE);
+       }
        /* close fd after removing from event lists, or epoll.. is messed up */
        if(c->fd != -1 && !c->do_not_close) {
                verbose(VERB_ALGO, "close fd %d", c->fd);