Cover the receipt refusal and the sweep that wakes a drain

This commit is contained in:
2026-09-01 18:13:35 +02:00
parent 042a62be97
commit f0327044b1
5 changed files with 58 additions and 31 deletions
+5 -2
View File
@@ -49,7 +49,7 @@ export class HeldMessages {
this.sweep();
if (this.held.get(key)) {
this.log.warn('heldMessages - replacing a message on a re-used sequence number', { seqNr: key });
this.log.warn('heldMessages - replacing a message on a re-used sequence number', { seqNr: Number(key) });
} else if (this.held.full) {
this.dropOldest();
}
@@ -92,7 +92,10 @@ export class HeldMessages {
const [seqNr] = oldest;
this.log.warn('heldMessages - buffer full, dropping the oldest message', { max: this.max, seqNr });
this.log.warn('heldMessages - buffer full, dropping the oldest message', {
max: this.max,
seqNr: Number(seqNr),
});
}
/** Drops every message past its deadline. Runs before each hold and on its own timer. */
+1 -1
View File
@@ -9,7 +9,7 @@ import { receiptCodes } from './dlr.ts';
import { smppDate } from './message.ts';
import { uuidv7 } from './uuid.ts';
/** Both fields hold what the peer took, so a partial failure names what is already receipted. */
/** `pduObjs` holds what the peer took, so a partial failure names what is already receipted. */
export type SendDlrResult = {
err?: Error;
pduObjs: PduObject[];