Skip to content

Feature: TcpServer hot reload SSL file #355

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

Merged
merged 2 commits into from
Sep 10, 2024
Merged

Conversation

lizhizhuanshu
Copy link
Contributor

While the TcpServer is running, reload the SSL from the file. New connections will use the new SSL, while existing connections will remain unchanged.

@an-tao an-tao merged commit 417c352 into an-tao:master Sep 10, 2024
33 checks passed
@Mis1eader-dev
Copy link
Contributor

Is the sslContextPtr_ thread-safe?

@lizhizhuanshu
Copy link
Contributor Author

Is the sslContextPtr_ thread-safe?

The sslContextPtr_ of TcpServer is only accessed when loop_ receives a new connection request, after which it will pass the shared_ptr to the new TcpConnection. Therefore, modifying your own sslContextPtr_ in the loop thread is not an issue.

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.

3 participants