mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
parent
186a9e95f7
commit
b24f438daa
@ -235,8 +235,20 @@ void JsonRpcConnection::Disconnect()
|
|||||||
|
|
||||||
m_Stream->lowest_layer().cancel(ec);
|
m_Stream->lowest_layer().cancel(ec);
|
||||||
|
|
||||||
|
Timeout::Ptr shutdownTimeout (new Timeout(
|
||||||
|
m_IoStrand.context(),
|
||||||
|
m_IoStrand,
|
||||||
|
boost::posix_time::seconds(10),
|
||||||
|
[this, keepAlive](asio::yield_context yc) {
|
||||||
|
boost::system::error_code ec;
|
||||||
|
m_Stream->lowest_layer().cancel(ec);
|
||||||
|
}
|
||||||
|
));
|
||||||
|
|
||||||
m_Stream->next_layer().async_shutdown(yc[ec]);
|
m_Stream->next_layer().async_shutdown(yc[ec]);
|
||||||
|
|
||||||
|
shutdownTimeout->Cancel();
|
||||||
|
|
||||||
m_Stream->lowest_layer().shutdown(m_Stream->lowest_layer().shutdown_both, ec);
|
m_Stream->lowest_layer().shutdown(m_Stream->lowest_layer().shutdown_both, ec);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user