Skip to content

Commit

Permalink
[fix]: Don't try to broadcast to clients that don't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Marak committed Jun 13, 2011
1 parent 9202dd9 commit 26b8002
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/hookio/hook.js
Expand Up @@ -122,12 +122,17 @@ Hook.prototype._listen = function(options, callback){
}


// TODO: refactor try/catches out, we should be better away of current hook state

// Namespaced input events
self.on('i.*', function(event, event2, data){
client.input(event, event2, data);
try {
client.input(event, event2, data);
} catch(err) {
}
});

// Namespaced input events
// Namespaced output events
self.on('o.*', function(event, event2, data){
try {
client.output(event, event2, data);
Expand Down

0 comments on commit 26b8002

Please sign in to comment.