beast
beast copied to clipboard
async_close do not recv peer close frame
I use async_close to close the socket, but after 5min recv callback, have any method to force close the connection, and not wait the close frame
may be I should call
std::optional<boost::beast::websocket::stream<
boost::beast::ssl_stream<boost::beast::tcp_stream>>> ws_stream_;
//force close?
boost::beast::get_lowest_layer(*ws_stream_).cancel();
after that I want to do reconnect
ws_stream_.emplace(exec_, ctx_);
it is right? thanks