Tear down at once on a peer unbind and stop reporting a reconnect after close

This commit is contained in:
2026-08-30 21:01:46 +02:00
parent 66b7d90bbf
commit 7e8af3c308
7 changed files with 125 additions and 24 deletions
-1
View File
@@ -118,7 +118,6 @@ export class SmppServer extends EventEmitter<ServerEvents> {
/** Stops listening, then drains and closes every session that was live when it stopped. */
async close(options: CloseOptions = {}): Promise<void> {
// Before the drain, or the listener keeps accepting connections nothing will ever close.
const stopped = new Promise<void>(resolve => { this.server.close(() => { resolve(); }); });
const live = [...this.sessions];