File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,11 @@ module Hasql.Notifications
1717 FatalError (.. ),
1818 )
1919where
20-
21- import Control.Concurrent (threadDelay , threadWaitRead )
20+ #if defined(mingw32_HOST_OS)
21+ import Control.Concurrent ( threadDelay )
22+ #else
23+ import Control.Concurrent (threadWaitRead , threadDelay )
24+ #endif
2225import Control.Exception (Exception , throw )
2326import Control.Monad (forever , unless , void , when )
2427import Data.ByteString.Char8 (ByteString )
@@ -190,9 +193,13 @@ waitForNotifications sendNotification con =
190193 mfd <- PQ. socket pqCon
191194 case mfd of
192195 Nothing -> void $ threadDelay 1000000
196+ #if defined(mingw32_HOST_OS)
197+ Just _ -> do
198+ void $ threadDelay 1000000
199+ #else
193200 Just fd -> do
194201 void $ threadWaitRead fd
195-
202+ #endif
196203 result <- PQ. consumeInput pqCon
197204 unless result $ do
198205 mError <- PQ. errorMessage pqCon
You can’t perform that action at this time.
0 commit comments