Warn once at the held-message bound, tell receivers sendResp() is what releases a message, and pin that a refused segment joins no group
Mirror / push (push) Has been cancelled
Test / test (18) (pull_request) Successful in 31s
Test / test (22) (pull_request) Successful in 31s
Test / test (26) (pull_request) Successful in 32s
Test / lint (pull_request) Successful in 23s
Test / test (20) (pull_request) Successful in 31s
Test / test (24) (pull_request) Successful in 31s

This commit is contained in:
2026-09-26 14:41:10 +02:00
parent fb6b125aab
commit b9167073d4
8 changed files with 50 additions and 21 deletions
+14
View File
@@ -71,6 +71,7 @@ export class IncomingRequests {
private readonly smsIdFormat: SmsIdFormat;
private readonly systemId: string;
private linkGeneration = 0;
private refusing = false;
constructor(options: IncomingRequestsOptions) {
this.dlrMerger = options.dlrMerger;
@@ -148,6 +149,7 @@ export class IncomingRequests {
/** Drops the segments of every message that never became whole, and of every one still held. */
clear(): void {
this.linkGeneration++;
this.refusing = false;
this.held.clear();
this.reassembler.clear();
}
@@ -217,6 +219,13 @@ export class IncomingRequests {
*/
private async onMessage(pduObj: PduObject): Promise<void> {
if (this.held.full()) {
if (!this.refusing) {
this.refusing = true;
this.log.warn('session - unanswered messages at their bound, refusing new ones until the application answers', {
messages: this.held.size,
});
}
this.log.verbose('session - unanswered messages at their bound, asking the peer to retry', {
cmdName: pduObj.cmdName,
seqNr: pduObj.seqNr,
@@ -226,6 +235,11 @@ export class IncomingRequests {
return;
}
if (this.refusing) {
this.refusing = false;
this.log.info('session - unanswered messages below their bound, accepting again', { messages: this.held.size });
}
const concat = concatOf(pduObj);
if (!concat) {