Skip to content

fix: Ensure dummy server is stopped on program exit#3281

Closed
condy0919 wants to merge 1 commit intoapache:masterfrom
condy0919:dummy
Closed

fix: Ensure dummy server is stopped on program exit#3281
condy0919 wants to merge 1 commit intoapache:masterfrom
condy0919:dummy

Conversation

@condy0919
Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: resolve #3280

Problem Summary:

What is changed and the side effects?

Changed:

Add a static DummyServerStopper object whose destructor calls the new StopDummyServer() function, guaranteeing that the dummy server is properly stopped and joined when the program exits.

Also make g_dummy_server an atomic pointer with explicit memory ordering to ensure safe access across threads, and provide the public StopDummyServer() API for explicit cleanup if needed.


Check List:

Add a static `DummyServerStopper` object whose destructor calls the new
`StopDummyServer()` function, guaranteeing that the dummy server is properly
stopped and joined when the program exits.

Also make `g_dummy_server` an atomic pointer with explicit memory ordering to
ensure safe access across threads, and provide the public `StopDummyServer()`
API for explicit cleanup if needed.

Fix apache#3280
@condy0919 condy0919 closed this Apr 23, 2026
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.

给 dummy server 增加一个 Stop 函数

1 participant