Skip to content

fix potential NPE#30

Merged
yuzifeng1984 merged 3 commits into
masterfrom
bugfix/issue-29-fix-npe
Mar 11, 2026
Merged

fix potential NPE#30
yuzifeng1984 merged 3 commits into
masterfrom
bugfix/issue-29-fix-npe

Conversation

@yuzifeng1984
Copy link
Copy Markdown
Contributor

Fix #29

Copy link
Copy Markdown
Contributor

@yokofly yokofly left a comment

Choose a reason for hiding this comment

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

P2 valid. ClientPool tracks queue slots, not only live Client objects, so GuardedClient::~GuardedClient() still needs to call Release(std::move(client), valid) whenever pool_ is set, even if client == nullptr. Skipping that permanently drops a slot, which can lead to acquire timeouts and the pool-size assert on destruction. Minimal fix: restore if (pool_) here; the same cleanup rule likely also applies to the move-assignment path.

Comment thread timeplus/client_pool.h Outdated
@yuzifeng1984 yuzifeng1984 force-pushed the bugfix/issue-29-fix-npe branch from 3483765 to 1e5a820 Compare March 11, 2026 09:40
@yuzifeng1984 yuzifeng1984 merged commit f74d0d8 into master Mar 11, 2026
1 of 9 checks passed
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.

NPE Crash with Invalid Credentials in ClientPool::GuardedClient::TestConnection

2 participants