diff --git a/src/session.ts b/src/session.ts index 7833aa6..f5ddffa 100644 --- a/src/session.ts +++ b/src/session.ts @@ -273,7 +273,7 @@ export class Session extends EventEmitter { return { err: bound.err }; } - // close() can land while the rebind is in flight, and it has nothing left to tear down. + // close() can land while the rebind is in flight. if (this.reconnectLoop?.isStopped() === true) { this.teardown(); diff --git a/test/session-extras.test.ts b/test/session-extras.test.ts index f43a67c..b64f301 100644 --- a/test/session-extras.test.ts +++ b/test/session-extras.test.ts @@ -419,7 +419,7 @@ describe('reconnect', () => { session.on('reconnected', () => { reconnects++; }); await session.close(); - await new Promise(resolve => setTimeout(resolve, 150)); + await delay(150); assert.equal(reconnects, 0); await smpp.close(); diff --git a/todo.md b/todo.md index 48f14a7..058b314 100644 --- a/todo.md +++ b/todo.md @@ -124,9 +124,9 @@ session message is a change to every call site. loses every incomplete group, and a peer has no reason to resend a receipt it already had answered. Surviving one means exposing the merge state for the application to persist and hand back, which is a public-surface decision. -- [ ] **`session.ts` is 468 lines.** The one seam left in it is a socket-to-PDU transport, which - would move the deliberately public `sock` field out of `Session` or turn it into a getter — - a public-surface change, so it waits for a decision. +- [ ] **`session.ts` has one seam left in it**, a socket-to-PDU transport, which would move the + deliberately public `sock` field out of `Session` or turn it into a getter — a public-surface + change, so it waits for a decision. - [ ] **Group the session's collaborators under `src/session/`.** Only `session.ts` imports `reassembly`, `dlr-merger`, `send-window`, `link-timers`, `reconnect-loop`, `pending-requests` and `send-sms`, so the directory would make that boundary visible. Do it on the next