diff --git a/src/ATrade/Broker/Server.hs b/src/ATrade/Broker/Server.hs index 35cda5d..0c2f99e 100644 --- a/src/ATrade/Broker/Server.hs +++ b/src/ATrade/Broker/Server.hs @@ -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])