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
17
17
FatalError (.. ),
18
18
)
19
19
where
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
22
25
import Control.Exception (Exception , throw )
23
26
import Control.Monad (forever , unless , void , when )
24
27
import Data.ByteString.Char8 (ByteString )
@@ -190,9 +193,13 @@ waitForNotifications sendNotification con =
190
193
mfd <- PQ. socket pqCon
191
194
case mfd of
192
195
Nothing -> void $ threadDelay 1000000
196
+ #if defined(mingw32_HOST_OS)
197
+ Just _ -> do
198
+ void $ threadDelay 1000000
199
+ #else
193
200
Just fd -> do
194
201
void $ threadWaitRead fd
195
-
202
+ #endif
196
203
result <- PQ. consumeInput pqCon
197
204
unless result $ do
198
205
mError <- PQ. errorMessage pqCon
You can’t perform that action at this time.
0 commit comments