Unlink session when exit message has been forwarded to session (#2703)

* Unlink session when exit message has been forwarded to session

* Readjust possition of emqx_protocol:session
This commit is contained in:
Gilbert 2019-07-20 13:05:34 +08:00 committed by turtleDeng
parent 49afbdabda
commit 05b660ff50
1 changed files with 1 additions and 0 deletions

View File

@ -328,6 +328,7 @@ terminate_session(Reason, ProtoState) ->
undefined ->
ok;
SessionPid ->
unlink(SessionPid),
SessionPid ! {'EXIT', self(), Reason}
end.