Skip to content

Use std::shared_ptr for coro::net::ssl_context#205

Merged
jbaldwin merged 1 commit intomainfrom
issue-204/ssl_context_shared_ptr
Nov 15, 2023
Merged

Use std::shared_ptr for coro::net::ssl_context#205
jbaldwin merged 1 commit intomainfrom
issue-204/ssl_context_shared_ptr

Conversation

@jbaldwin
Copy link
Owner

Previously this was a raw pointer to allow for the user to pass in a global ssl context across various tcp_clients... this is pretty unsafe and I previously moved away from this model for the coro::io_scheduler handle that gets passed into the coro::net::tcp_client. To be consistent and safe this pointer is being moved to an std::shared_ptr.

Closes #204

Previously this was a raw pointer to allow for the user to pass in a
global ssl context across various tcp_clients... this is pretty unsafe
and I previously moved away from this model for the coro::io_scheduler
handle that gets passed into the coro::net::tcp_client.  To be
consistent and safe this pointer is being moved to an std::shared_ptr.

Closes #204
@jbaldwin jbaldwin self-assigned this Nov 15, 2023
@jbaldwin jbaldwin merged commit 25962b6 into main Nov 15, 2023
@jbaldwin jbaldwin deleted the issue-204/ssl_context_shared_ptr branch November 15, 2023 22:05
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.

Use std::shared_ptr for coro::ssl_context pointers

1 participant