diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b39d4b2..517f52bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Version 267: * Add package for Travis config * Fix signed/unsigned mismatch in file_stdio::seek +* basic_stream dtor cannot throw -------------------------------------------------------------------------------- diff --git a/include/boost/beast/core/impl/basic_stream.hpp b/include/boost/beast/core/impl/basic_stream.hpp index 336c09f2..4cb5058a 100644 --- a/include/boost/beast/core/impl/basic_stream.hpp +++ b/include/boost/beast/core/impl/basic_stream.hpp @@ -145,9 +145,13 @@ basic_stream:: 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.