Skip to content

Close the MongoClient in destroy() instead of stop() - #68

Merged
rhusar merged 1 commit into
jgroups-extras:mainfrom
rsobies:keep-client-across-reconnect
Nov 14, 2026
Merged

rhusar merged 1 commit into
jgroups-extras:mainfrom
rsobies:keep-client-across-reconnect

Conversation

@rsobies

@rsobies rsobies commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

No description provided.

JChannel.disconnect() and a subsequent connect() cycle stop() and start()
without re-running init(), so closing the client in stop() left a
reconnected channel with a closed client ("state should be: open").
The client is created in init() and is now closed in the matching
destroy(), after JDBC_PING2.stop() has removed the local entry.
destroy() also drops the collection, so the collection of the closed
client is not handed out afterwards.

Signed-off-by: rsobies <rsobies@gmail.com>
@rsobies
rsobies requested a review from rhusar as a code owner November 14, 2026 18:59
@rhusar
rhusar merged commit b4b397c into jgroups-extras:main Nov 14, 2026
1 check passed
@rhusar

rhusar commented Nov 14, 2026

Copy link
Copy Markdown
Member

Thanks @rsobies

@rhusar

rhusar commented Nov 14, 2026

Copy link
Copy Markdown
Member

btw always reference the issue from the commit also ideally in the text somewhere include 'fixes #xyz' which github uses to autoclose issues.

@rhusar

rhusar commented Nov 14, 2026

Copy link
Copy Markdown
Member

Here's a quick fix to the PR #69 -- but only nits and precautions.

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