Skip to content

Commit

Permalink
refactor: move the req attribute to the polling class
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Jun 21, 2024
1 parent 9b1af95 commit 4e834e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export abstract class Transport extends EventEmitter {
* @protected
*/
protected parser: any;
protected req: EngineRequest;
/**
* Whether the transport supports binary payloads (else it will be base64-encoded)
* @protected
Expand Down Expand Up @@ -99,13 +98,10 @@ export abstract class Transport extends EventEmitter {
/**
* Called with an incoming HTTP request.
*
* @param {http.IncomingMessage} req
* @param req
* @package
*/
onRequest(req) {
debug("setting request");
this.req = req;
}
onRequest(req: any) {}

/**
* Closes the transport.
Expand Down
1 change: 1 addition & 0 deletions lib/transports-uws/polling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class Polling extends Transport {
public maxHttpBufferSize: number;
public httpCompression: any;

private req: HttpRequest & { cleanup: () => void };
private res: HttpResponse;
private dataReq: HttpRequest;
private dataRes: HttpResponse;
Expand Down
1 change: 1 addition & 0 deletions lib/transports/polling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export class Polling extends Transport {
public maxHttpBufferSize: number;
public httpCompression: any;

private req: EngineRequest;
private res: ServerResponse;
private dataReq: IncomingMessage;
private dataRes: ServerResponse;
Expand Down

0 comments on commit 4e834e2

Please # to comment.