mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 21:34:46 +02:00
Handle expired timers in basic_stream transfer_op
Previously, the code only handled expired timers when the buffer was empty.
This commit is contained in:
committed by
Mohammad Nejati
parent
95f0cfb926
commit
2dcdef3890
@@ -656,6 +656,17 @@ public:
|
||||
ioc.restart();
|
||||
}
|
||||
|
||||
{
|
||||
// non-empty buffer, timeout
|
||||
test_server srv("*", ep, log);
|
||||
stream_type s(ioc);
|
||||
s.socket().connect(srv.local_endpoint());
|
||||
s.expires_after(std::chrono::seconds(0));
|
||||
s.async_write_some(cb, handler(error::timeout, 0));
|
||||
ioc.run();
|
||||
ioc.restart();
|
||||
}
|
||||
|
||||
// abandoned operation
|
||||
{
|
||||
stream_type s(ioc);
|
||||
|
Reference in New Issue
Block a user