You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/11/15 21:05:27 UTC

[03/31] qpid-proton git commit: PROTON-1639: epoll.c assert() on immediate connect() failure

PROTON-1639: epoll.c assert() on immediate connect() failure

The epoll proactor was asserting if a connect() call failed immediately.

This doesn't show up in most tests because the connect() is non-blocking, and
most failures are deferred to epoll and handled correctly

However trying to connect() to an IPv6 address with IPv6 disabled does fail
immediately and causes an assert() failure.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/e479d4c0
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/e479d4c0
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/e479d4c0

Branch: refs/heads/go1
Commit: e479d4c0c65c8fe7aec60f6b34416c70d99e93fc
Parents: b94d7dd
Author: Alan Conway <ac...@redhat.com>
Authored: Fri Oct 20 14:35:18 2017 +0100
Committer: Alan Conway <ac...@redhat.com>
Committed: Fri Oct 20 14:57:45 2017 +0100

----------------------------------------------------------------------
 proton-c/src/proactor/epoll.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e479d4c0/proton-c/src/proactor/epoll.c
----------------------------------------------------------------------
diff --git a/proton-c/src/proactor/epoll.c b/proton-c/src/proactor/epoll.c
index d5a323c..6234d4b 100644
--- a/proton-c/src/proactor/epoll.c
+++ b/proton-c/src/proactor/epoll.c
@@ -129,7 +129,7 @@ typedef struct epoll_extended_t {
   pmutex barrier_mutex;
 } epoll_extended_t;
 
-/* epoll_ctl()/epoll_wake() do not form a memory barrier, so cached memory
+/* epoll_ctl()/epoll_wait() do not form a memory barrier, so cached memory
    writes to struct epoll_extended_t in the EPOLL_ADD thread might not be
    visible to epoll_wait() thread. This function creates a memory barrier,
    called before epoll_ctl() and after epoll_wait()
@@ -1267,7 +1267,7 @@ void pn_proactor_connect(pn_proactor_t *p, pn_connection_t *c, const char *addr)
       pn_connection_open(pc->driver.connection); /* Auto-open */
       pc->ai = pc->addrinfo;
       pconnection_maybe_connect_lh(pc); /* Start connection attempts */
-      notify = pc->disconnected;
+      if (pc->disconnected) notify = wake(&pc->context);
     } else {
       psocket_gai_error(&pc->psocket, gai_error, "connect to ");
       notify = wake(&pc->context);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org