mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 04:47:29 +02:00
@ -4,6 +4,7 @@ Version XXX:
|
|||||||
* Refactor websocket read
|
* Refactor websocket read
|
||||||
* Correct buffer_bytes documentation
|
* Correct buffer_bytes documentation
|
||||||
* Fix examples to dispatch to strand
|
* Fix examples to dispatch to strand
|
||||||
|
* Ensure basic_stream::close will not throw
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -291,8 +291,8 @@ private:
|
|||||||
template<class Executor2>
|
template<class Executor2>
|
||||||
void on_timer(Executor2 const& ex2);
|
void on_timer(Executor2 const& ex2);
|
||||||
|
|
||||||
void reset(); // set timeouts to never
|
void reset(); // set timeouts to never
|
||||||
void close(); // cancel everything
|
void close() noexcept; // cancel everything
|
||||||
};
|
};
|
||||||
|
|
||||||
// We use shared ownership for the state so it can
|
// We use shared ownership for the state so it can
|
||||||
|
@ -143,21 +143,19 @@ template<class Protocol, class Executor, class RatePolicy>
|
|||||||
void
|
void
|
||||||
basic_stream<Protocol, Executor, RatePolicy>::
|
basic_stream<Protocol, Executor, RatePolicy>::
|
||||||
impl_type::
|
impl_type::
|
||||||
close()
|
close() noexcept
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
error_code ec;
|
error_code ec;
|
||||||
socket.close(ec);
|
socket.close(ec);
|
||||||
}
|
}
|
||||||
timer.cancel();
|
try
|
||||||
|
{
|
||||||
|
timer.cancel();
|
||||||
// have to let the read/write ops cancel the timer,
|
}
|
||||||
// otherwise we will get error::timeout on close when
|
catch(...)
|
||||||
// we actually want net::error::operation_aborted.
|
{
|
||||||
//
|
}
|
||||||
//read.timer.cancel();
|
|
||||||
//write.timer.cancel();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user