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 <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2021-08-26 16:41:45 +10:00
parent 1e8c184d8e
commit 5c017654e8

View file

@ -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);