Fix some error for reauthentication
This commit is contained in:
parent
5f4417c193
commit
c35a40a6b6
|
@ -236,10 +236,15 @@ handle_in(?CONNECT_PACKET(ConnPkt), Channel) ->
|
||||||
handle_out(connack, ReasonCode, NChannel)
|
handle_out(connack, ReasonCode, NChannel)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
handle_in(Packet = ?AUTH_PACKET(?RC_CONTINUE_AUTHENTICATION, _Properties), Channel) ->
|
handle_in(Packet = ?AUTH_PACKET(?RC_CONTINUE_AUTHENTICATION, _Properties), Channel = #channel{conn_state = ConnState}) ->
|
||||||
case enhanced_auth(Packet, Channel) of
|
case enhanced_auth(Packet, Channel) of
|
||||||
{ok, NProperties, NChannel} ->
|
{ok, NProperties, NChannel} ->
|
||||||
process_connect(NProperties, ensure_connected(NChannel));
|
case ConnState of
|
||||||
|
connecting ->
|
||||||
|
process_connect(NProperties, ensure_connected(NChannel));
|
||||||
|
_ ->
|
||||||
|
handle_out(auth, {?RC_SUCCESS, NProperties}, NChannel)
|
||||||
|
end;
|
||||||
{continue, NProperties, NChannel} ->
|
{continue, NProperties, NChannel} ->
|
||||||
handle_out(auth, {?RC_CONTINUE_AUTHENTICATION, NProperties}, NChannel);
|
handle_out(auth, {?RC_CONTINUE_AUTHENTICATION, NProperties}, NChannel);
|
||||||
{error, NReasonCode, NChannel} ->
|
{error, NReasonCode, NChannel} ->
|
||||||
|
|
Loading…
Reference in New Issue