From c94e4b90d7b01516e964d282921cf03e1bb8d372 Mon Sep 17 00:00:00 2001 From: Denis Tereshkin Date: Sun, 7 Apr 2024 10:55:41 +0700 Subject: [PATCH] brokerclient: update sqnum based on incoming sqnum --- src/ATrade/Broker/Client.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ATrade/Broker/Client.hs b/src/ATrade/Broker/Client.hs index 1a9a130..f52caf0 100644 --- a/src/ATrade/Broker/Client.hs +++ b/src/ATrade/Broker/Client.hs @@ -188,7 +188,7 @@ notificationThread clientIdentity callbacks ctx ep idCounter cmdVar killMv secPa when (getNotificationSqnum notification /= currentSqnum) $ do log Warning "Broker.Client" $ "Notification sqnum mismatch: " <> (T.pack . show) currentSqnum <> " -> " <> (T.pack . show) (getNotificationSqnum notification) - atomicWriteIORef notifSqnumRef (nextSqnum currentSqnum) + atomicWriteIORef notifSqnumRef (nextSqnum $ getNotificationSqnum notification) forM_ callbacks $ \c -> c notification atomicWriteIORef lastKnownNotificationSqnum currentSqnum _ -> return ()