Commit 008f579c authored by Leo Iannacone's avatar Leo Iannacone

fix socket.get - deprecated in version 1.x

parent 90bc7ff5
......@@ -165,17 +165,15 @@ function Client(socket) {
// on client disconnection close all watchers
socket.on('disconnect', function () {
socket.get('watchers', function (err, socket_watchers) {
if (!socket_watchers)
return;
for (var key in socket_watchers) {
try {
socket_watchers[key].close();
} catch (error_watch) {}
}
});
var socket_watchers = socket.watchers;
if (!socket_watchers)
return;
for (var key in socket_watchers) {
try {
socket_watchers[key].close();
} catch (error_watch) {}
}
});
};
this.send_status = function (status) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment