Bugfix in on-error event

This commit is contained in:
Foxi352 2016-07-03 20:20:19 +02:00
parent beebea8dae
commit bcf7a34070

View File

@ -27,7 +27,7 @@ SmartHomeNGConnection.prototype.init = function () {
that.startMonitoring(); that.startMonitoring();
connection.on('message', function(message) { that.receive(message); }); connection.on('message', function(message) { that.receive(message); });
connection.on('error', function() { connection.on('error', function(error) {
that.log(colorOn + '[SmartHomeNGConnection] WebSocket error: ' + error.toString() + colorOff) that.log(colorOn + '[SmartHomeNGConnection] WebSocket error: ' + error.toString() + colorOff)
}); });
connection.on('close', function(code, description) { connection.on('close', function(code, description) {