You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var mqtt = require('mqtt');
// Create a client connection
var client = mqtt.connect('mqtt://test.mosquitto.org');
client.on('connect', function() { // When connected
console.log('connected');
// subscribe to a topic
client.subscribe('hello/world', function() {
// when a message arrives, do something with it
client.on('message', function(topic, message, packet) {
console.log("Received '" + message + "' on '" + topic + "'");
});
});
// publish a message to a topic
client.publish('hello/world', 'my message', function() {
console.log("Message is published");
client.end(); // Close the connection when published
});
});
and it fails with
connected
Message is published
.../node_modules/mqtt/lib/store.js:55
packet = this._inflights[packet.messageId];
^
TypeError: Cannot read property '19063' of null
FYI with 0.3.13. it works.
The text was updated successfully, but these errors were encountered:
Hello. I'm trying 1.0.1 with a simple example
and it fails with
FYI with 0.3.13. it works.
The text was updated successfully, but these errors were encountered: