Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

polling: implemented new protocol

  • Loading branch information...
commit cbe8a2ef0522102b93cc62ea348b23b4d569edeb 1 parent ba82df2
@rauchg rauchg authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/transports/polling.js
View
8 lib/transports/polling.js
@@ -171,14 +171,14 @@ Polling.prototype.onDataRequest = function (req, res) {
Polling.prototype.onData = function (data) {
debug('received "%s"', data);
var self = this;
- parser.decodePayload(data, function(){
- if ('close' == packets[i].type) {
+ parser.decodePayload(data, function(packet){
+ if ('close' == packet.type) {
debug('got xhr close packet');
- this.onClose();
+ self.onClose();
return false;
}
- self.onPacket(packets[i]);
+ self.onPacket(packet);
});
};
Please sign in to comment.
Something went wrong with that request. Please try again.