-
Couldn't load subscription status.
- Fork 90
Description
ouroboros-network/Win32-network/src/System/Win32/Async.hsimplementsreadHandleby initiating an async read then callingwaitForCompletion, which will, via anMVar, wait for
c_GetQueuedCompletionStatusto complete in another thread, which passes inmaxBoundfor timeout, which will be passed toHsGetQueuedCompletionStatusand thenGetQueuedCompletionStatus, which can result in an infinite wait.ouroboros-network/Win32-network/test/Test/Async.hsincludes a test interrupting this operation by callingkillThread, which in combination with the surrounding code will close all the pipe and port handles. Although closing all related handles will break the infinite wait, it is a blunt hammer. Instead, preferCancelIoExto cancel a request individually or use timed instead of infinite waits.
As reported by Root9B.