Browse Source

Broker: send notifications in correct order

master
Denis Tereshkin 9 years ago
parent
commit
cdea147b9e
  1. 2
      src/ATrade/Broker/Server.hs

2
src/ATrade/Broker/Server.hs

@ -158,7 +158,7 @@ brokerServerThread state = finally brokerServerThread' cleanup @@ -158,7 +158,7 @@ brokerServerThread state = finally brokerServerThread' cleanup
case maybeNs of
Just ns -> do
atomicMapIORef state (\s -> s { pendingNotifications = M.insert peerId [] (pendingNotifications s)})
return $ ResponseNotifications ns
return $ ResponseNotifications . L.reverse $ ns
Nothing -> return $ ResponseNotifications []
sendMessage sock peerId resp = sendMulti sock (peerId :| [B.empty, BL.toStrict . encode $ resp])

Loading…
Cancel
Save