diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bd7577d..9cda050b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ +* Fix basic_stream expires_after (API Change) * Fix FILE namespace qualification +API Changes: + +basic_stream::expires_after used to take a nanosecond duration type argument. This +required users on systems where the steady_clock::duration_type was less accurate +to explicity duration_cast when calling this function, making code non-portable. +The duration type is now that of the embedded steady_clock. + +-------------------------------------------------------------------------------- + Version 294: * Fix FILE namespace qualification diff --git a/include/boost/beast/core/basic_stream.hpp b/include/boost/beast/core/basic_stream.hpp index ade909e3..bd7bbd77 100644 --- a/include/boost/beast/core/basic_stream.hpp +++ b/include/boost/beast/core/basic_stream.hpp @@ -456,7 +456,7 @@ public: */ void expires_after( - std::chrono::nanoseconds expiry_time); + net::steady_timer::duration expiry_time); /** Set the timeout for the next logical operation. diff --git a/include/boost/beast/core/impl/basic_stream.hpp b/include/boost/beast/core/impl/basic_stream.hpp index 2fc9f793..f21958c0 100644 --- a/include/boost/beast/core/impl/basic_stream.hpp +++ b/include/boost/beast/core/impl/basic_stream.hpp @@ -704,7 +704,7 @@ release_socket() -> template void basic_stream:: -expires_after(std::chrono::nanoseconds expiry_time) +expires_after(net::steady_timer::duration expiry_time) { // If assert goes off, it means that there are // already read or write (or connect) operations