From f679d6e172b81e56ff71778c64f0343f20ad1f54 Mon Sep 17 00:00:00 2001 From: Ferenc Holzhauser Date: Mon, 16 Dec 2019 08:38:11 +0100 Subject: [PATCH] Fix shutdown reason in case of connect error (#96) --- src/emqtt.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emqtt.erl b/src/emqtt.erl index d2c560de..031a63cd 100644 --- a/src/emqtt.erl +++ b/src/emqtt.erl @@ -631,7 +631,7 @@ initialized({call, From}, {connect, ConnMod}, State = #state{sock_opts = SockOpt {stop_and_reply, Reason, [{reply, From, Error}]} end; Error = {error, Reason} -> - {stop_and_reply, Reason, [{reply, From, Error}]} + {stop_and_reply, {shutdown, Reason}, [{reply, From, Error}]} end; initialized(EventType, EventContent, State) ->