Permalink
Browse files

drain not being called

  • Loading branch information...
ericz committed Jan 16, 2013
1 parent 2148478 commit d6a826959a7ca3cd0a78da07f971053cf23c5561
Showing with 8 additions and 8 deletions.
  1. +8 −8 lib/client.js
View
@@ -34,16 +34,16 @@ function BinaryClient(socket, options) {
this._socket.binaryType = 'arraybuffer';
this._socket.addEventListener('open', function(){
- // if node
- self._socket._sender._socket.on('drain', function(){
- var ids = Object.keys(self.streams);
- for (var i = 0, ii = ids.length; i < ii; i++) {
- self.streams[ids[i]]._onDrain();
- }
- });
- // end node
self.emit('open');
});
+ // if node
+ this._socket._sender._socket.on('drain', function(){
+ var ids = Object.keys(self.streams);
+ for (var i = 0, ii = ids.length; i < ii; i++) {
+ self.streams[ids[i]]._onDrain();
+ }
+ });
+ // end node
this._socket.addEventListener('error', function(error){
var ids = Object.keys(self.streams);
for (var i = 0, ii = ids.length; i < ii; i++) {

0 comments on commit d6a8269

Please sign in to comment.