Browse Source

brokerclient: update sqnum based on incoming sqnum

master
Denis Tereshkin 2 years ago
parent
commit
c94e4b90d7
  1. 2
      src/ATrade/Broker/Client.hs

2
src/ATrade/Broker/Client.hs

@ -188,7 +188,7 @@ notificationThread clientIdentity callbacks ctx ep idCounter cmdVar killMv secPa
when (getNotificationSqnum notification /= currentSqnum) $ do when (getNotificationSqnum notification /= currentSqnum) $ do
log Warning "Broker.Client" $ log Warning "Broker.Client" $
"Notification sqnum mismatch: " <> (T.pack . show) currentSqnum <> " -> " <> (T.pack . show) (getNotificationSqnum notification) "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 forM_ callbacks $ \c -> c notification
atomicWriteIORef lastKnownNotificationSqnum currentSqnum atomicWriteIORef lastKnownNotificationSqnum currentSqnum
_ -> return () _ -> return ()

Loading…
Cancel
Save