basic_stream dtor cannot throw

fix #1688
This commit is contained in:
Vinnie Falco committed 2019-08-28 16:02:31 -07:00
1 parent 70f232f6dd
commit db2f0052ff
2 files changed
+6 -1

No files matched your search

@@ -145,9 +145,13 @@ basic_stream<Protocol, Executor, RatePolicy>::
impl_type::
close()
{
socket.close();
{
error_code ec;
socket.close(ec);
}
timer.cancel();
// have to let the read/write ops cancel the timer,
// otherwise we will get error::timeout on close when
// we actually want net::error::operation_aborted.