fix(emqx): return reason code 0x05 when open_session failed

This commit is contained in:
Shawn 2021-05-14 19:30:13 +08:00
parent 587aabd3a9
commit 8d2ddb0535
1 changed files with 1 additions and 1 deletions

View File

@ -428,7 +428,7 @@ process(?CONNECT_PACKET(
{?RC_SUCCESS, SP, PState4};
{error, Error} ->
?LOG(error, "Failed to open session: ~p", [Error]),
{?RC_UNSPECIFIED_ERROR, PState1#pstate{credentials = Credentials0}}
{?RC_NOT_AUTHORIZED, PState1#pstate{credentials = Credentials0}}
end;
{error, Reason} ->
?LOG(warning, "Client ~s (Username: '~s') login failed for ~p", [NewClientId, Username, Reason]),