mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-23 11:39:43 +01:00
Fix botched merge
This commit is contained in:
parent
84dc076a64
commit
2c2c817ad8
1 changed files with 3 additions and 5 deletions
|
@ -166,9 +166,7 @@ serverRequestCall s cq@CompletionQueue{.. } rm =
|
||||||
<$> peek call
|
<$> peek call
|
||||||
<*> C.getAllMetadataArray md
|
<*> C.getAllMetadataArray md
|
||||||
<*> (if havePay then toBS pay else return Nothing)
|
<*> (if havePay then toBS pay else return Nothing)
|
||||||
<*> liftM2 (+) (getTime Monotonic) (C.timeSpec <$> peek dead)
|
<*> convertDeadline dead
|
||||||
-- gRPC gives us a deadline that is just a delta, so we convert
|
|
||||||
-- it to a proper deadline.
|
|
||||||
_ -> do
|
_ -> do
|
||||||
lift $ dbug $ "Throwing callError: " ++ show ce
|
lift $ dbug $ "Throwing callError: " ++ show ce
|
||||||
throwE (GRPCIOCallError ce)
|
throwE (GRPCIOCallError ce)
|
||||||
|
@ -186,8 +184,8 @@ serverRequestCall s cq@CompletionQueue{.. } rm =
|
||||||
| otherwise -> Just <$> C.copyByteBufferToByteString bb
|
| otherwise -> Just <$> C.copyByteBufferToByteString bb
|
||||||
convertDeadline deadline = do
|
convertDeadline deadline = do
|
||||||
deadline' <- C.timeSpec <$> peek deadline
|
deadline' <- C.timeSpec <$> peek deadline
|
||||||
--On OS X, gRPC gives us a deadline that is just a delta, so we
|
-- On OS X, gRPC gives us a deadline that is just a delta, so we convert
|
||||||
--convert it to an actual deadline.
|
-- it to an actual deadline.
|
||||||
if os == "darwin"
|
if os == "darwin"
|
||||||
then do now <- getTime Monotonic
|
then do now <- getTime Monotonic
|
||||||
return $ now + deadline'
|
return $ now + deadline'
|
||||||
|
|
Loading…
Reference in a new issue