From 2c2c817ad8cd2287e7c3480dee0205dc27fa5dc8 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Mon, 11 Jul 2016 15:20:00 -0500 Subject: [PATCH] Fix botched merge --- src/Network/GRPC/LowLevel/CompletionQueue.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Network/GRPC/LowLevel/CompletionQueue.hs b/src/Network/GRPC/LowLevel/CompletionQueue.hs index 39507cc..9b436df 100644 --- a/src/Network/GRPC/LowLevel/CompletionQueue.hs +++ b/src/Network/GRPC/LowLevel/CompletionQueue.hs @@ -166,9 +166,7 @@ serverRequestCall s cq@CompletionQueue{.. } rm = <$> peek call <*> C.getAllMetadataArray md <*> (if havePay then toBS pay else return Nothing) - <*> liftM2 (+) (getTime Monotonic) (C.timeSpec <$> peek dead) - -- gRPC gives us a deadline that is just a delta, so we convert - -- it to a proper deadline. + <*> convertDeadline dead _ -> do lift $ dbug $ "Throwing callError: " ++ show ce throwE (GRPCIOCallError ce) @@ -186,8 +184,8 @@ serverRequestCall s cq@CompletionQueue{.. } rm = | otherwise -> Just <$> C.copyByteBufferToByteString bb convertDeadline deadline = do deadline' <- C.timeSpec <$> peek deadline - --On OS X, gRPC gives us a deadline that is just a delta, so we - --convert it to an actual deadline. + -- On OS X, gRPC gives us a deadline that is just a delta, so we convert + -- it to an actual deadline. if os == "darwin" then do now <- getTime Monotonic return $ now + deadline'