mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-14 07:09:41 +01:00
Make server process killable
35163c3c18
introduced a new use of `mask` which makes the server process uninterruptible
while waiting for a new incoming request. This change fixes that by
surrounding the logic that waits for a new request with `unmask`. This
new `unmask` should still respect the finalization guarantees of the
surrounding masked code.
This commit is contained in:
parent
595cb6a3bf
commit
d4a80a9a4e
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ withServerCallAsync :: Server
|
|||
-> (ServerCall -> IO ())
|
||||
-> IO ()
|
||||
withServerCallAsync s f = mask $ \unmask ->
|
||||
serverCreateCall s >>= \case
|
||||
unmask (serverCreateCall s) >>= \case
|
||||
Left e -> do grpcDebug $ "withServerCallAsync: call error: " ++ show e
|
||||
return ()
|
||||
Right c -> do wasForkSuccess <- forkServer s handler
|
||||
|
|
Loading…
Reference in a new issue