base: Fix fdReady() potentially running forever on Windows.
authorNiklas Hamb├╝chen <mail@nh2.me>
Tue, 19 Sep 2017 19:10:00 +0000 (15:10 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 19 Sep 2017 19:58:45 +0000 (15:58 -0400)
commitc2a1fa7aec426727be6df79f3db109183e42cfdc
tree969c9ddaf8e9374d7e3a827142e1c30244feeed0
parent28a115e5e2c3c19b860545f1fcde4317bac3ee2a
base: Fix fdReady() potentially running forever on Windows.

This fixes #13497 for Windows -- at least for the `if (isSock)` part; I
haven't investigated the case where it's not a socket yet.

Solved by copying the new current-time based waiting logic from the
non-Windows implementation above.

Reviewers: bgamari, austin, hvr

Reviewed By: bgamari

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3954
libraries/base/cbits/inputReady.c