forked from boostorg/beast
WebSocket close will automatically drain (API Change):
fix #642 * Calls to stream::close and stream::async_close will automatically perform the required read operations Actions Required: * Remove calling code which drains the connection after calling stream::close or stream::async_close
This commit is contained in:
@@ -216,27 +216,7 @@ private:
|
||||
{
|
||||
if(ec)
|
||||
return fail("on_close", ec);
|
||||
do_drain();
|
||||
}
|
||||
|
||||
void
|
||||
do_drain()
|
||||
{
|
||||
ws_.async_read(buffer_,
|
||||
alloc_.wrap(std::bind(
|
||||
&connection::on_drain,
|
||||
shared_from_this(),
|
||||
ph::_1)));
|
||||
}
|
||||
|
||||
void
|
||||
on_drain(error_code ec)
|
||||
{
|
||||
if(ec)
|
||||
return fail("on_drain", ec);
|
||||
do_drain();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class timer
|
||||
|
||||
Reference in New Issue
Block a user