basic_stream dtor cannot throw

fix #1688
This commit is contained in:
Vinnie Falco
2019-08-27 08:22:57 -07:00
parent 70f232f6dd
commit db2f0052ff
2 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,7 @@ Version 267:
* Add package for Travis config * Add package for Travis config
* Fix signed/unsigned mismatch in file_stdio::seek * Fix signed/unsigned mismatch in file_stdio::seek
* basic_stream dtor cannot throw
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

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