From 101b624cdc7eca85cdd55f1cb8f782f65fe9669a Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 28 Sep 2026 11:11:02 +0200 Subject: [PATCH] Build IncomingRequests after the collaborators it reaches through the session --- src/session.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/session.ts b/src/session.ts index 248fafe..d7e6d85 100644 --- a/src/session.ts +++ b/src/session.ts @@ -114,18 +114,6 @@ export class Session extends EventEmitter { max: defaults.maxDlrMerges, timeout: defaults.dlrMergeTimeout, }); - this.incoming = new IncomingRequests({ - dlrMerger: this.dlrMerger, - log: this.log, - maxOctets: options.maxOctets, - maxReassembly: options.maxReassembly, - onRequest: options.onRequest, - reassemblyTimeout: options.reassemblyTimeout, - sendPastDrain: input => this.outgoing.requestPastDrain(input, {}), - session: this, - smsIdFormat: options.smsIdFormat, - systemId: options.systemId, - }); this.reconnectLoop = this.loopFor(options.reconnect); this.timers = new LinkTimers({ enquireLinkInterval: options.enquireLinkInterval, @@ -142,6 +130,18 @@ export class Session extends EventEmitter { responseTimeout: options.responseTimeout ?? defaults.responseTimeout, transport: this.transport, }); + this.incoming = new IncomingRequests({ + dlrMerger: this.dlrMerger, + log: this.log, + maxOctets: options.maxOctets, + maxReassembly: options.maxReassembly, + onRequest: options.onRequest, + reassemblyTimeout: options.reassemblyTimeout, + sendPastDrain: input => this.outgoing.requestPastDrain(input, {}), + session: this, + smsIdFormat: options.smsIdFormat, + systemId: options.systemId, + }); this.resetTimers(); }