Skip to content

Commit

Permalink
docs: add some TODOs for the next major release
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Jan 10, 2023
1 parent d0fd474 commit 33dc073
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const debug = debugModule("engine:socket");

export class Socket extends EventEmitter {
public readonly protocol: number;
// TODO for the next major release: do not keep the reference to the first HTTP request, as it stays in memory
public readonly request: IncomingMessage;
public readonly remoteAddress: string;

Expand Down
2 changes: 2 additions & 0 deletions lib/transports/polling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export class Polling extends Transport {
debug("request overlap");
// assert: this.res, '.req and .res should be (un)set together'
this.onError("overlap from client");
// TODO for the next major release: use an HTTP 400 status code (https://github.com/socketio/engine.io/issues/650)
res.writeHead(500);
res.end();
return;
Expand Down Expand Up @@ -116,6 +117,7 @@ export class Polling extends Transport {
if (this.dataReq) {
// assert: this.dataRes, '.dataReq and .dataRes should be (un)set together'
this.onError("data request overlap from client");
// TODO for the next major release: use an HTTP 400 status code (https://github.com/socketio/engine.io/issues/650)
res.writeHead(500);
res.end();
return;
Expand Down

0 comments on commit 33dc073

Please sign in to comment.