From c869bd58f267b286186687f6fcabf6606dd4d132 Mon Sep 17 00:00:00 2001 From: Dmitry Zuikov Date: Sun, 17 Mar 2024 04:58:38 +0300 Subject: [PATCH] wip, fix --- hbs2-peer/app/RPC2/Poll.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hbs2-peer/app/RPC2/Poll.hs b/hbs2-peer/app/RPC2/Poll.hs index ec895721..2d0082b2 100644 --- a/hbs2-peer/app/RPC2/Poll.hs +++ b/hbs2-peer/app/RPC2/Poll.hs @@ -24,7 +24,9 @@ instance (MonadIO m, HasRpcContext PeerAPI RPC2Context m) => HandleMethod m RpcP handleMethod (r,t,i) = do brains <- getRpcContext @PeerAPI <&> rpcBrains debug $ "rpc.pollAdd" - addPolledRef @L4Proto brains r t i + polled <- isPolledRef @L4Proto brains t r + unless polled do + addPolledRef @L4Proto brains r t i instance (MonadIO m, HasRpcContext PeerAPI RPC2Context m) => HandleMethod m RpcPollDel where