Merge branch 'emq20' of https://github.com/emqtt/emqttd into emq20

This commit is contained in:
Feng Lee 2016-12-01 15:18:29 +08:00
commit 8116357d07
2 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,7 @@
# *EMQ* - Erlang MQTT Broker [![Build Status](https://travis-ci.org/emqtt/emqttd.svg?branch=master)](https://travis-ci.org/emqtt/emqttd)
*EMQ (Erlang MQTT Broker)* is a distributed, massively scalable, highly extensible MQTT message broker written in Erlang/OTP.
*EMQ* (Erlang MQTT Broker) is a distributed, massively scalable, highly extensible MQTT message broker written in Erlang/OTP.
*EMQ* is fully open source and licensed under the Apache Version 2.0. *EMQ* implements both MQTT V3.1 and V3.1.1 protocol specifications, and supports MQTT-SN, CoAP, WebSocket, STOMP and SockJS at the same time.

View File

@ -332,10 +332,16 @@ handle_cast({unsubscribe, TopicTable}, Session = #session{client_id = Client
end, Subscriptions, TopicTable),
hibernate(Session#session{subscriptions = Subscriptions1});
handle_cast({destroy, ClientId}, Session = #session{client_id = ClientId}) ->
handle_cast({destroy, ClientId}, Session = #session{client_id = ClientId, client_pid = undefined}) ->
?LOG(warning, "destroyed", [], Session),
shutdown(destroy, Session);
%%
handle_cast({destroy, ClientId}, Session = #session{client_id = ClientId, client_pid = OldClientPid}) ->
?LOG(warning, "kickedout~p", [OldClientPid], Session),
shutdown(conflict, Session);
handle_cast({resume, ClientId, ClientPid}, Session = #session{client_id = ClientId,
client_pid = OldClientPid,
clean_sess = CleanSess,