Enable support for timeouts in FileDescriptorEvent.wait.

This commit is contained in:
Sönke Ludwig 2017-08-13 23:35:11 +02:00
parent 5e979364cb
commit 62ee67091d
No known key found for this signature in database
GPG key ID: D95E8DB493EE314C

View file

@ -1011,7 +1011,7 @@ struct FileDescriptorEvent {
Waitable!(IOCallback, Waitable!(IOCallback,
cb => eventDriver.sockets.waitForData(m_socket, cb), cb => eventDriver.sockets.waitForData(m_socket, cb),
(cb) { assert(false, "timeout not supported."); } cb => eventDriver.sockets.cancelRead(m_socket)
) readwaiter; ) readwaiter;
asyncAwaitAny!true(timeout, readwaiter); asyncAwaitAny!true(timeout, readwaiter);