In particular, prevent FD_CONNECT from being reported when not selected for.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- server/sock.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/server/sock.c b/server/sock.c index 945895b51a4..565fb4c5a2c 100644 --- a/server/sock.c +++ b/server/sock.c @@ -1809,7 +1809,10 @@ DECL_HANDLER(set_socket_event) old_event = sock->event; sock->mask = req->mask; if (req->window) - sock->reported_events &= ~req->mask; /* re-enable held events */ + { + sock->pending_events &= ~req->mask; + sock->reported_events &= ~req->mask; + } sock->event = NULL; sock->window = req->window; sock->message = req->msg;