Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Conversation

@USetf
Copy link

@USetf USetf commented Jan 12, 2026

fixes a issue where TcpServer might crash or hang during the shutdown process. The root cause is the premature destruction of the EventLoopPool before all cleanup tasks are completed.

USetf added 2 commits January 6, 2026 16:40
fixes a critical issue where TcpServer might crash or hang during the shutdown process. The root cause is the premature destruction of the EventLoopPool before all cleanup tasks are completed.
Fix: Ensure EventLoopPool lifetime covers connection cleanup in TcpServer
@an-tao an-tao requested review from hwc0919 and marty1885 January 26, 2026 07:39
Copy link
Collaborator

@hwc0919 hwc0919 left a comment

Choose a reason for hiding this comment

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

What about this:

auto loopPoolPtr = loopPoolPtr_.release();
loopPoolPtr_ = nullptr;

In this case the pool will stop when TcpServer::stop() returns (if the pool was created by TcpServer). Otherwise the pool will keep running until TcpServer instance destructs.

Could you try it?

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