From 5c017654e83fe3173c07020ceebb7d449786e1cb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 26 Aug 2021 16:41:45 +1000 Subject: [PATCH] ei: always queue a disconnect event locally In the case of a refused portal connection we get disconnected before we had a chance to send the CONNECT message. This still needs to queue a disconnect event and thus bubble back up to the caller. Signed-off-by: Peter Hutterer --- src/libei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libei.c b/src/libei.c index aab2017..09a5057 100644 --- a/src/libei.c +++ b/src/libei.c @@ -355,8 +355,8 @@ ei_disconnect(struct ei *ei) if (state != EI_STATE_NEW) { ei->requests->disconnect(ei); - queue_disconnect_event(ei); } + queue_disconnect_event(ei); ei->state = EI_STATE_DISCONNECTED; if (ei->source) source_remove(ei->source);