input/async: move the IsEOF() check to a separate block
This commit is contained in:
@ -187,9 +187,12 @@ AsyncInputStream::Read(std::unique_lock<Mutex> &lock,
|
|||||||
Check();
|
Check();
|
||||||
|
|
||||||
r = buffer.Read();
|
r = buffer.Read();
|
||||||
if (!r.empty() || IsEOF())
|
if (!r.empty())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (IsEOF())
|
||||||
|
return 0;
|
||||||
|
|
||||||
caller_cond.wait(lock);
|
caller_cond.wait(lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user