Last active
December 14, 2015 16:28
-
-
Save adamvr/5114932 to your computer and use it in GitHub Desktop.
Two clients interfere with each other since they have the same client ID
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mqtt = require('mqtt'); | |
var client1 = mqtt.createClient() | |
, client2 = mqtt.createClient(); | |
client1.on('close', function () { | |
console.log('client1 closing'); | |
}); | |
client2.on('close', function () { | |
console.log('client2 closing'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mar 8 09:08:35 christopher mosquitto[679]: New connection from 127.0.0.1. | |
Mar 8 09:08:35 christopher mosquitto[679]: New client connected from 127.0.0.1 as mqttjs_d6bd6054a4c869f1. | |
Mar 8 09:08:35 christopher mosquitto[679]: Client mqttjs_d6bd6054a4c869f1 already connected, closing old connection. | |
Mar 8 09:08:35 christopher mosquitto[679]: New client connected from 127.0.0.1 as mqttjs_d6bd6054a4c869f1. | |
Mar 8 09:08:45 christopher mosquitto[679]: Socket read error on client mqttjs_d6bd6054a4c869f1, disconnecting. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment