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

handle_socket_init, uninitialized socket for tls #709

Open
JulianSchutsch opened this issue Mar 23, 2018 · 2 comments
Open

handle_socket_init, uninitialized socket for tls #709

JulianSchutsch opened this issue Mar 23, 2018 · 2 comments

Comments

@JulianSchutsch
Copy link

JulianSchutsch commented Mar 23, 2018

Websocketpp Version: Current development branch, head.
When using the websocketpp::config::asio_tls_client and handle_socket_init with something like:

void T::handle_socket_init(Connection, boost::asio::ssl::streamboost::asio::ip::tcp::socket& socket) {
boost::asio::ip::tcp::no_delay n(true);
socket.lowest_layer().set_option(n);
}

This gives:

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::system::system_error >'
what(): set_option: Bad file descriptor
Aborted (core dumped)

Am I misreading the documentation? It seems the only way to initialize this option is to store the socket pointer somewhere and do this in the connect callback (which works, tested).

@urp
Copy link

urp commented Nov 9, 2018

Seems to be related to #530

@JulianSchutsch
Copy link
Author

It is, i follow the other thread.

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

No branches or pull requests

2 participants