diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-07-17 20:49:31 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-07-17 20:58:28 +0200 |
commit | 79655a00f7d7a95d9954947df50a8b772af8e703 (patch) | |
tree | b20ffafd8deabbd339503d5620804f25e5236752 /main/Test.hs | |
parent | dc8954b9ef7e0e230707777c1f640dd15e79dcd0 (diff) |
Merge multiple data responses into a single stream
Changelog: Fix sending multiple data responses in a stream
Diffstat (limited to 'main/Test.hs')
-rw-r--r-- | main/Test.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/Test.hs b/main/Test.hs index 6b6d1d4..97eaee7 100644 --- a/main/Test.hs +++ b/main/Test.hs @@ -501,11 +501,11 @@ cmdPeerList = do cmdTestMessageSend :: Command cmdTestMessageSend = do - [spidx, tref] <- asks tiParams + spidx : trefs <- asks tiParams st <- asks tiStorage - Just ref <- liftIO $ readRef st (encodeUtf8 tref) + Just refs <- liftIO $ fmap sequence $ mapM (readRef st . encodeUtf8) trefs peer <- getPeer spidx - sendToPeer peer $ TestMessage $ wrappedLoad ref + sendManyToPeer peer $ map (TestMessage . wrappedLoad) refs cmdOut "test-message-send done" cmdSharedStateGet :: Command |