Fix credentials is null bug

This commit is contained in:
turtled 2019-09-04 16:19:03 +08:00
parent 0908974017
commit 0943129287
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ received(Packet = ?PACKET(?CONNECT), PState = #pstate{connected = false}) ->
case check_max_clients() of
true ->
?LOG(error, "Connection rejected due to max clients limitation"),
connack({?RC_QUOTA_EXCEEDED, PState});
connack({?RC_QUOTA_EXCEEDED, PState#pstate{credentials = credentials(PState)}});
false ->
do_received(Packet, PState)
end;