most probably fix rpc lock issue

This commit is contained in:
voidlizard 2025-02-15 13:51:36 +03:00
parent dd310888a5
commit 8ca4dd79bf
1 changed files with 2 additions and 4 deletions

View File

@ -131,13 +131,11 @@ makeRequestR :: forall api method e m . ( KnownNat (FromJust (FindMethodIndex 0
)
=> Input method -> m (ServiceProto api e)
makeRequestR input = do
t <- getTimeCoarse <&> round @_ @Word64 . realToFrac
n <- liftIO $ randomIO @Word64
rnum <- atomically do
n <- readTVar rnumnum
modifyTVar' rnumnum succ
pure (fromIntegral $ hash (n+t))
pure (fromIntegral n)
pure $ ServiceRequest rnum (serialise (fromIntegral idx :: Int, serialise input))
where