Skip to content

Fixed SQLJobManager::endAll() crashing when disconnecting#490

Merged
SanjulaGanepola merged 2 commits intomainfrom
fixEndAllOnDisconnected
Jan 22, 2026
Merged

Fixed SQLJobManager::endAll() crashing when disconnecting#490
SanjulaGanepola merged 2 commits intomainfrom
fixEndAllOnDisconnected

Conversation

@sebjulliand
Copy link
Member

Issue found by @drahreg while using the exported API.

When disconnecting or when the connection is lost (e.g. the VPN died), the disconnect event triggers the db2i-disconnect callback that is supposed to clear everything up.

The problem is SQLManager::endAll() gets called at this point, but it fails to close the SQL jobs because the connection is already gone. Since it fails, the internal jobs list and the selected job are not cleared and these values are kept when reconnecting, leading to potential issues afterwards.

This PR fixes the issue by adding an optional parameter to endAll() so it doesn't try to close the jobs if the connection is already gone (the jobs are gone too at this point anyway).

Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand sebjulliand requested a review from a team January 21, 2026 15:05
@sebjulliand sebjulliand self-assigned this Jan 21, 2026
@sebjulliand sebjulliand added the bug Something isn't working label Jan 21, 2026
@github-actions
Copy link

github-actions bot commented Jan 21, 2026

👋 A new build is available for this PR based on e41d149.

Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Copy link
Member

@SanjulaGanepola SanjulaGanepola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@SanjulaGanepola SanjulaGanepola merged commit d1bbc7e into main Jan 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants