Browse files

Fix for flush in htmlfile

  • Loading branch information...
1 parent ea36d24 commit 5e329229b4f08700101d554276d0f95f7830195b @rauchg rauchg committed Jun 25, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/socket.io/transports/htmlfile.js
View
6 lib/socket.io/transports/htmlfile.js
@@ -17,11 +17,11 @@ exports.htmlfile = Client.extend({
'Transfer-Encoding': 'chunked'
});
this.response.write('<html><body>' + new Array(244).join(' '));
- this.response.flush();
+ if ('flush' in this.response) this.response.flush();
this._payload();
this._heartbeatInterval = setInterval(function(){
self.response.write('<!-- heartbeat -->');
- self.response.flush();
+ if ('flush' in self.response) self.response.flush();
}, this.options.heartbeatInterval);
break;
@@ -44,7 +44,7 @@ exports.htmlfile = Client.extend({
_write: function(message){
this.response.write('<script>parent.s._('+ message +', document);</script>');
- this.response.flush();
+ if ('flush' in this.response) this.response.flush();
}
});

0 comments on commit 5e32922

Please sign in to comment.