We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3be3a76 commit d24d28aCopy full SHA for d24d28a
1 file changed
packages/engine.io/lib/transports/polling.ts
@@ -274,8 +274,8 @@ export class Polling extends Transport {
274
headers["Content-Length"] =
275
"string" === typeof data ? Buffer.byteLength(data) : data.length;
276
this.res.writeHead(200, this.headers(this.req, headers));
277
+ this.res.once("finish", callback);
278
this.res.end(data);
- callback();
279
};
280
281
if (!this.httpCompression || !options.compress) {
@@ -298,8 +298,8 @@ export class Polling extends Transport {
298
this.compress(data, encoding, (err, data) => {
299
if (err) {
300
this.res.writeHead(500);
301
302
this.res.end();
- callback(err);
303
return;
304
}
305
0 commit comments