Check for error code in asynchronous handler before copying out buffered
data.
This commit is contained in:
parent
ea25d1be81
commit
40e376e4b4
@ -230,7 +230,7 @@ public:
|
||||
template <typename Error>
|
||||
void operator()(const Error& e, size_t bytes_recvd)
|
||||
{
|
||||
if (buffer_.empty())
|
||||
if (e || buffer_.empty())
|
||||
{
|
||||
size_t length = 0;
|
||||
handler_(e, length);
|
||||
|
Loading…
Reference in New Issue
Block a user