From 6f2cdca40835c9498c3364c32b24adfc16be0381 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Wed, 30 Nov 2016 21:41:03 +0800 Subject: [PATCH 1/2] *EMQ* --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 658a83201..95a0a0d54 100644 --- a/README.md +++ b/README.md @@ -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. From 0b9339105086246de0b1e6211006590039826ba1 Mon Sep 17 00:00:00 2001 From: turtled Date: Thu, 1 Dec 2016 10:39:14 +0800 Subject: [PATCH 2/2] fix issue#151 --- src/emqttd_session.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/emqttd_session.erl b/src/emqttd_session.erl index f53f363a4..b6add0581 100644 --- a/src/emqttd_session.erl +++ b/src/emqttd_session.erl @@ -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,