Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Polling.prototype.onData = function (data) {
debug('received "%s"', data);
var self = this;
var callback = function (packet) {
if ('close' === packet.type) {
debug('got xhr close packet');
self.onClose();
return false;
}
self.onPacket(packet);
};
parser.decodePayload(data, callback);
};
Polling.prototype.onData = function (data) {
debug('received "%s"', data);
var self = this;
var callback = function(packet) {
if ('close' == packet.type) {
debug('got xhr close packet');
self.onClose();
return false;
}
self.onPacket(packet);
};
parser.decodePayload(data, callback);
};
Polling.prototype.onData = function (data) {
debug('received "%s"', data);
var self = this;
var callback = function(packet) {
if ('close' == packet.type) {
debug('got xhr close packet');
self.onClose();
return false;
}
self.onPacket(packet);
};
parser.decodePayload(data, callback);
};
Polling.prototype.onData = function (data) {
debug('received "%s"', data);
var self = this;
var callback = function(packet) {
if ('close' == packet.type) {
debug('got xhr close packet');
self.onClose();
return false;
}
self.onPacket(packet);
};
parser.decodePayload(data, callback);
};
Polling.prototype.onData = function (data) {
debug('received "%s"', data);
var self = this;
var callback = function (packet) {
if ('close' === packet.type) {
debug('got xhr close packet');
self.onClose();
return false;
}
self.onPacket(packet);
};
parser.decodePayload(data, callback);
};