Skip to content

Commit

Permalink
Fix for flush in htmlfile
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Jun 25, 2010
1 parent ea36d24 commit 5e32922
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/socket.io/transports/htmlfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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.