Minor change

This commit is contained in:
selva.andre
2014-09-19 13:31:25 +02:00
parent 2e4e060b46
commit 359556909c
@@ -126,6 +126,7 @@ class ProtocolProcessor implements EventHandler<ValueEvent> {
IAuthenticator authenticator) { IAuthenticator authenticator) {
//m_clientIDs = clientIDs; //m_clientIDs = clientIDs;
this.subscriptions = subscriptions; this.subscriptions = subscriptions;
LOG.debug("subscription tree on init {}", subscriptions.dumpTree());
m_authenticator = authenticator; m_authenticator = authenticator;
m_messagesStore = storageService; m_messagesStore = storageService;
m_sessionsStore = sessionsStore; m_sessionsStore = sessionsStore;
@@ -525,7 +526,7 @@ class ProtocolProcessor implements EventHandler<ValueEvent> {
LOG.warn("Disconnected client <{}> with clean session {}", clientID, cleanSession); LOG.warn("Disconnected client <{}> with clean session {}", clientID, cleanSession);
} }
void proccessConnectionLost(String clientID) { void processConnectionLost(String clientID) {
//If already removed a disconnect message was already processed for this clientID //If already removed a disconnect message was already processed for this clientID
if (m_clientIDs.remove(clientID) != null) { if (m_clientIDs.remove(clientID) != null) {
@@ -533,11 +534,9 @@ class ProtocolProcessor implements EventHandler<ValueEvent> {
subscriptions.deactivate(clientID); subscriptions.deactivate(clientID);
LOG.info("Lost connection with client <{}>", clientID); LOG.info("Lost connection with client <{}>", clientID);
} }
//TODO publish the Will message (if any) for the clientID //publish the Will message (if any) for the clientID
if (m_willStore.containsKey(clientID)) { if (m_willStore.containsKey(clientID)) {
WillMessage will = m_willStore.get(clientID); WillMessage will = m_willStore.get(clientID);
// PublishEvent pubEvt = new PublishEvent(will.getTopic(), will.getQos(),
// will.getPayload(), will.isRetained(), clientID);
processPublish(will, clientID); processPublish(will, clientID);
m_willStore.remove(clientID); m_willStore.remove(clientID);
} }