Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/transports/polling.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Polling.prototype.onDataRequest = function (req, res) {
this.dataReq = req;
this.dataRes = res;

var chunks = isBinary ? new Buffer(0) : ''; // eslint-disable-line node/no-deprecated-api
var chunks = isBinary ? Buffer.concat([]) : '';
var self = this;

function cleanup () {
Expand All @@ -162,7 +162,7 @@ Polling.prototype.onDataRequest = function (req, res) {
}

if (contentLength > self.maxHttpBufferSize) {
chunks = isBinary ? new Buffer(0) : ''; // eslint-disable-line node/no-deprecated-api
chunks = isBinary ? Buffer.concat([]) : '';
req.connection.destroy();
}
}
Expand Down