We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65b1ad1 commit be3833bCopy full SHA for be3833b
lib/transports/polling.js
@@ -136,7 +136,7 @@ Polling.prototype.onDataRequest = function (req, res) {
136
this.dataReq = req;
137
this.dataRes = res;
138
139
- var chunks = isBinary ? new Buffer(0) : ''; // eslint-disable-line node/no-deprecated-api
+ var chunks = isBinary ? Buffer.concat([]) : '';
140
var self = this;
141
142
function cleanup () {
@@ -162,7 +162,7 @@ Polling.prototype.onDataRequest = function (req, res) {
162
}
163
164
if (contentLength > self.maxHttpBufferSize) {
165
- chunks = isBinary ? new Buffer(0) : ''; // eslint-disable-line node/no-deprecated-api
+ chunks = isBinary ? Buffer.concat([]) : '';
166
req.connection.destroy();
167
168
0 commit comments