octoblu / meshblu

Meshblu is a cross-protocol IoT machine-to-machine messaging system.
https://meshblu.readme.io/
MIT License
816 stars 181 forks source link

MessageIOClient not closed on Mosca server 'unsubscribed' event #101

Closed masato closed 9 years ago

masato commented 9 years ago

It seems that MessageIOClient not closed when a MQTT subscribe client closed. When I start a MQTT subscribe client I receive duplicate messages. With a snippet below in mqttServer.js, it seems to be stopped duplicate message.

  server.on('unsubscribed', function(packet, client) {
    if (client.messageIOClient) {
        client.messageIOClient.close();
    }
  });
masato commented 9 years ago

fixed