Skip to content

fix(smpp): avoid leaking pending session contexts on rejected binds - #266

Merged
JChrist merged 1 commit into
mainfrom
fix/ctx
Jun 9, 2026
Merged

fix(smpp): avoid leaking pending session contexts on rejected binds#266
JChrist merged 1 commit into
mainfrom
fix/ctx

Conversation

@JChrist

@JChrist JChrist commented Jun 9, 2026

Copy link
Copy Markdown
Member

The bind handler stored each session's context in pendingSessionContexts right after authentication, before the per-account connection-limit check. When that check rejected a bind, sessionCreated was never invoked, so the entry was never removed and the map grew unbounded.

Defer the insert until after all rejection checks pass, and also remove the entry in sessionDestroyed so every teardown path cleans up.

@JChrist
JChrist requested review from a team and lykakis June 9, 2026 09:31
The bind handler stored each session's context in pendingSessionContexts
right after authentication, before the per-account connection-limit check.
When that check rejected a bind, sessionCreated was never invoked, so the
entry was never removed and the map grew unbounded.

Defer the insert until after all rejection checks pass, and also remove
the entry in sessionDestroyed so every teardown path cleans up.

Signed-off-by: jchrist <jchrist@cytech.gr>
@JChrist
JChrist merged commit d6c83c1 into main Jun 9, 2026
13 checks passed
@JChrist
JChrist deleted the fix/ctx branch June 9, 2026 09:41
@JChrist
JChrist restored the fix/ctx branch June 9, 2026 10:01
@JChrist
JChrist deleted the fix/ctx branch June 10, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants