mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
feature-check for bufferedAmount
This commit is contained in:
@@ -89,7 +89,7 @@ WS.prototype.write = function(packets){
|
||||
this.socket.send(parser.encodePayload(packets));
|
||||
// check periodically if we're done sending
|
||||
this.bufferedAmountId = this.setInterval(function() {
|
||||
if (socket.bufferedAmount == 0) {
|
||||
if ('bufferedAmount' in this.socket && this.socket.bufferedAmount == 0) {
|
||||
clearInterval(self.bufferedAmountId);
|
||||
this.writable = true;
|
||||
this.emit('drain');
|
||||
|
||||
Reference in New Issue
Block a user