You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by cl...@apache.org on 2021/12/20 17:31:10 UTC
[qpid-proton] branch main updated: PROTON-2362: epoll proactor - handle connection wake and listener close before task setup complete
This is an automated email from the ASF dual-hosted git repository.
cliffjansen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
The following commit(s) were added to refs/heads/main by this push:
new f734e9e PROTON-2362: epoll proactor - handle connection wake and listener close before task setup complete
f734e9e is described below
commit f734e9ea41ff39d23a489090c04851f2ccd3e187
Author: Cliff Jansen <cl...@apache.org>
AuthorDate: Mon Dec 20 09:29:47 2021 -0800
PROTON-2362: epoll proactor - handle connection wake and listener close before task setup complete
---
c/src/proactor/epoll.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/c/src/proactor/epoll.c b/c/src/proactor/epoll.c
index 2f491ca..6ad043f 100644
--- a/c/src/proactor/epoll.c
+++ b/c/src/proactor/epoll.c
@@ -965,7 +965,7 @@ static inline bool pconnection_wclosed(pconnection_t *pc) {
close/shutdown. Let read()/write() return 0 or -1 to trigger cleanup logic.
*/
static int pconnection_rearm_check(pconnection_t *pc) {
- if (pconnection_rclosed(pc) && pconnection_wclosed(pc)) {
+ if ((pconnection_rclosed(pc) && pconnection_wclosed(pc)) || pc->psocket.epoll_io.fd == -1) {
return 0;
}
uint32_t wanted_now = (pc->read_blocked && !pconnection_rclosed(pc)) ? EPOLLIN : 0;
@@ -1652,7 +1652,7 @@ static void listener_begin_close(pn_listener_t* l) {
void pn_listener_close(pn_listener_t* l) {
bool notify = false;
lock(&l->task.mutex);
- if (!l->task.closing) {
+ if (l->task.proactor && !l->task.closing) {
listener_begin_close(l);
notify = schedule(&l->task);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org