Check for error code in asynchronous handler before copying out buffered

data.
This commit is contained in:
chris 2004-01-17 04:22:37 +00:00
parent ea25d1be81
commit 40e376e4b4

View File

@ -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);