Skip to content
Browse files

Fix a bug in emitter queue.

We can't start sending events until the socket is open.
  • Loading branch information...
1 parent 831f485 commit eaae13773ed7c52804f852551902ad1e7578896e @mbostock mbostock committed Sep 12, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/cube/server/emitter.js
View
2 lib/cube/server/emitter.js
@@ -54,7 +54,7 @@ module.exports = function() {
emitter.send = function(event) {
queue.push(event);
- flush();
+ if (socket.readyState === socket.OPEN) flush();
return emitter;
};

0 comments on commit eaae137

Please sign in to comment.
Something went wrong with that request. Please try again.