mirror of
https://gitee.com/openharmony/third_party_nghttp2
synced 2024-11-30 11:30:44 +00:00
asio: Fix bug that server event loop breaks with exception
This can happen when we call throwing version of basic_stream_socket::remote_endpoint() call while client disconnected.
This commit is contained in:
parent
e302cc9c16
commit
2d6211c455
@ -79,8 +79,10 @@ public:
|
||||
|
||||
/// Start the first asynchronous operation for the connection.
|
||||
void start() {
|
||||
boost::system::error_code ec;
|
||||
|
||||
handler_ = std::make_shared<http2_handler>(
|
||||
socket_.get_io_service(), socket_.lowest_layer().remote_endpoint(),
|
||||
socket_.get_io_service(), socket_.lowest_layer().remote_endpoint(ec),
|
||||
[this]() { do_write(); }, mux_);
|
||||
if (handler_->start() != 0) {
|
||||
stop();
|
||||
|
Loading…
Reference in New Issue
Block a user