Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsafe shutdown of listening socket #47

Closed
zhiming99 opened this issue Jan 3, 2024 · 1 comment · Fixed by #43
Closed

Unsafe shutdown of listening socket #47

zhiming99 opened this issue Jan 3, 2024 · 1 comment · Fixed by #43
Assignees
Labels
bug Something isn't working

Comments

@zhiming99
Copy link
Owner

It is unsafe to shutdown the listening socket from other thread than the sock-loop thread, which creates potential race condition of the CRpcListeningSock between the task-thread and the sock-loop.

@zhiming99 zhiming99 self-assigned this Jan 3, 2024
@zhiming99 zhiming99 added the bug Something isn't working label Jan 3, 2024
@zhiming99 zhiming99 linked a pull request Jan 3, 2024 that will close this issue
@zhiming99
Copy link
Owner Author

Added a fix in the commit 414611e . The solution is to schedule a stop socket task to run on the sock-loop the listening socket is being polled from, instead of the random thread the caller OnPreStop is running on.

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 a pull request may close this issue.

1 participant