Permalink
Browse files

polling: implemented new protocol

  • Loading branch information...
1 parent ba82df2 commit cbe8a2ef0522102b93cc62ea348b23b4d569edeb @rauchg rauchg committed Mar 16, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 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);
});
};

0 comments on commit cbe8a2e

Please sign in to comment.