Drop the line count that drifts and reuse the delay helper
This commit is contained in:
+1
-1
@@ -273,7 +273,7 @@ export class Session extends EventEmitter<SessionEvents> {
|
||||
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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user