Skip to content

Commit 4e834e2

Browse files
refactor: move the req attribute to the polling class
1 parent 9b1af95 commit 4e834e2

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

lib/transport.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export abstract class Transport extends EventEmitter {
5454
* @protected
5555
*/
5656
protected parser: any;
57-
protected req: EngineRequest;
5857
/**
5958
* Whether the transport supports binary payloads (else it will be base64-encoded)
6059
* @protected
@@ -99,13 +98,10 @@ export abstract class Transport extends EventEmitter {
9998
/**
10099
* Called with an incoming HTTP request.
101100
*
102-
* @param {http.IncomingMessage} req
101+
* @param req
103102
* @package
104103
*/
105-
onRequest(req) {
106-
debug("setting request");
107-
this.req = req;
108-
}
104+
onRequest(req: any) {}
109105

110106
/**
111107
* Closes the transport.

lib/transports-uws/polling.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export class Polling extends Transport {
1515
public maxHttpBufferSize: number;
1616
public httpCompression: any;
1717

18+
private req: HttpRequest & { cleanup: () => void };
1819
private res: HttpResponse;
1920
private dataReq: HttpRequest;
2021
private dataRes: HttpResponse;

lib/transports/polling.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export class Polling extends Transport {
1616
public maxHttpBufferSize: number;
1717
public httpCompression: any;
1818

19+
private req: EngineRequest;
1920
private res: ServerResponse;
2021
private dataReq: IncomingMessage;
2122
private dataRes: ServerResponse;

0 commit comments

Comments
 (0)