From 79655a00f7d7a95d9954947df50a8b772af8e703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Wed, 17 Jul 2024 20:49:31 +0200 Subject: Merge multiple data responses into a single stream Changelog: Fix sending multiple data responses in a stream --- main/Test.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main') 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 -- cgit v1.2.3