We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3dcc2d5 commit 7f63d38Copy full SHA for 7f63d38
lib/transports/polling.js
@@ -140,11 +140,10 @@ Polling.prototype.onDataRequest = function (req, res) {
140
var self = this;
141
142
function cleanup () {
143
- chunks = isBinary ? new Buffer(0) : '';
144
req.removeListener('data', onData);
145
req.removeListener('end', onEnd);
146
req.removeListener('close', onClose);
147
- self.dataReq = self.dataRes = null;
+ self.dataReq = self.dataRes = chunks = null;
148
}
149
150
function onClose () {
@@ -163,7 +162,7 @@ Polling.prototype.onDataRequest = function (req, res) {
163
162
164
165
if (contentLength > self.maxHttpBufferSize) {
166
- chunks = '';
+ chunks = isBinary ? new Buffer(0) : '';
167
req.connection.destroy();
168
169
0 commit comments