From 1608151569aa3ad5a5f0721a178d176807102e32 Mon Sep 17 00:00:00 2001 From: Simon Tate Date: Mon, 20 Jul 2020 08:47:47 +0100 Subject: [PATCH] Fix bridge reconnect In the mux_epoll__add_in function, no context->events was set. Previously this was set to match the ev.events (EPOLLIN). Adding this back in, keeps the code consistent to before it was refactored to split out epoll and poll functions, as well as being consistent with the other mux_epoll__ functions. If this is not set, the connection is never fully established when the broker comes back up. Fixes #1680. Signed-off-by: Simon Tate --- src/mux_epoll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mux_epoll.c b/src/mux_epoll.c index 1b3a6a58..785beecd 100644 --- a/src/mux_epoll.c +++ b/src/mux_epoll.c @@ -157,6 +157,7 @@ int mux_epoll__add_in(struct mosquitto_db *db, struct mosquitto *context) if (epoll_ctl(db->epollfd, EPOLL_CTL_ADD, context->sock, &ev) == -1) { log__printf(NULL, MOSQ_LOG_ERR, "Error in epoll accepting: %s", strerror(errno)); } + context->events = EPOLLIN; return MOSQ_ERR_SUCCESS; }