Remove spurious assert

fix #1099
This commit is contained in:
Vinnie Falco
2018-05-18 16:45:58 -07:00
parent 86555b90ae
commit 6ea66fd89e
3 changed files with 9 additions and 18 deletions

View File

@ -1,6 +1,7 @@
Version 171:
* Add handler_ptr::has_value
* Remove spurious assert
--------------------------------------------------------------------------------

View File

@ -138,14 +138,8 @@ operator()(
d.cont = cont;
BOOST_ASIO_CORO_REENTER(*this)
{
// Maybe suspend
if(d.ws.wr_block_.try_lock(this))
{
// Make sure the stream is open
if(! d.ws.check_open(ec))
goto upcall;
}
else
// Attempt to acquire write block
if(! d.ws.wr_block_.try_lock(this))
{
// Suspend
BOOST_ASIO_CORO_YIELD
@ -159,12 +153,12 @@ operator()(
boost::asio::post(
d.ws.get_executor(), std::move(*this));
BOOST_ASSERT(d.ws.wr_block_.is_locked(this));
// Make sure the stream is open
if(! d.ws.check_open(ec))
goto upcall;
}
// Make sure the stream is open
if(! d.ws.check_open(ec))
goto upcall;
// Can't call close twice
BOOST_ASSERT(! d.ws.wr_close_);

View File

@ -626,12 +626,8 @@ operator()(
goto upcall;
close:
if(ws_.wr_block_.try_lock(this))
{
// Make sure the stream is open
BOOST_ASSERT(ws_.status_ == status::open);
}
else
// Try to acquire the write block
if(! ws_.wr_block_.try_lock(this))
{
// Suspend
BOOST_ASIO_CORO_YIELD