Merge pull request #232 from vibe-d/waitfordataex_fix
Fix waitForDataEx's return value for an open connection and a zero timeout
This commit is contained in:
commit
97fdff2574
|
@ -612,7 +612,10 @@ mixin(tracer);
|
|||
asyncAwaitAny!(true, waiter)(timeout);
|
||||
|
||||
if (!m_context) return WaitForDataStatus.noMoreData;
|
||||
if (cancelled) return WaitForDataStatus.timeout;
|
||||
// NOTE: for IOMode.immediate, no actual timeout occurrs, but the read
|
||||
// fails immediately with wouldBlock
|
||||
if (cancelled || status == IOStatus.wouldBlock)
|
||||
return WaitForDataStatus.timeout;
|
||||
|
||||
logTrace("Socket %s, read %s bytes: %s", m_socket, nbytes, status);
|
||||
|
||||
|
|
Loading…
Reference in a new issue