Skip to content

Commit

Permalink
Ignore error on "emit()" for each client socket
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Oct 21, 2013
1 parent e216cb9 commit 6aef488
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/adapter/socket.io.js
Expand Up @@ -139,8 +139,13 @@ exports.register = function(application, server, params) {
subscribers = [subscribers];
subscribers.forEach(function(subscriber) {
subscriber = watchSubscribers[subscriber];
if (subscriber)
if (!subscriber)
return;
try {
subscriber.emit('watch.notification', envelope.body);
} catch(exception) {
console.log(exception + '\n' + exception.stack);
}
});
};
connection.on('watch.notification', watchNotificationHandler);
Expand Down

0 comments on commit 6aef488

Please sign in to comment.