aboutsummaryrefslogtreecommitdiff
path: root/src/Ssb/Peer/RPC
diff options
context:
space:
mode:
authorHaskell Guy <haskell.guy@localhost>2020-05-28 12:40:39 +0200
committerHaskell Guy <haskell.guy@localhost>2020-05-28 12:40:39 +0200
commit604b736a8feac6736c4e01a85e0983699ebb1b6d (patch)
treea229d526348d38646358f5bebc546940536aaa42 /src/Ssb/Peer/RPC
parent41cde99ec6189dbecca6803a5aa4f6f18142e8ba (diff)
downloadssb-haskell-604b736a8feac6736c4e01a85e0983699ebb1b6d.tar.xz
Make slightly less verbose
Remove not needed printing to stdout and replace 'print's with putStrLn to avoid surrounding output with quotation marks.
Diffstat (limited to 'src/Ssb/Peer/RPC')
-rw-r--r--src/Ssb/Peer/RPC/Gossip.hs2
-rw-r--r--src/Ssb/Peer/RPC/Room.hs8
2 files changed, 2 insertions, 8 deletions
diff --git a/src/Ssb/Peer/RPC/Gossip.hs b/src/Ssb/Peer/RPC/Gossip.hs
index b97e4a4..80e1aac 100644
--- a/src/Ssb/Peer/RPC/Gossip.hs
+++ b/src/Ssb/Peer/RPC/Gossip.hs
@@ -115,7 +115,7 @@ writeFeed stream (Feed.Feed _ msgs) = do
(\msg -> do
let msg' = Feed.encodeJSONVerifiableMessage msg
err <- RPC.writeStream stream def (RPC.JSONPayload msg')
- either (\err -> print err) (\_ -> return ()) err
+ either (\err -> putStrLn err) (\_ -> return ()) err
)
instance ToJSON a => RPC.Handler (Gossiper a) where
diff --git a/src/Ssb/Peer/RPC/Room.hs b/src/Ssb/Peer/RPC/Room.hs
index 47bc956..0b85414 100644
--- a/src/Ssb/Peer/RPC/Room.hs
+++ b/src/Ssb/Peer/RPC/Room.hs
@@ -149,7 +149,6 @@ fork mVar action = do
forkFinally
action
(\_ -> do
- print "exiting fork"
atomically $ putTMVar fork' ()
)
@@ -185,11 +184,6 @@ createTunnel :: Room -> (RPC.Stream, RPC.Stream) -> IO (Either Text ())
createTunnel room (stream1, stream2) = do
let peer1 = RPC.connPeer $ RPC.conn stream1
let peer2 = RPC.connPeer $ RPC.conn stream2
- --print
- -- $ "creating tunnel for "
- -- <> Ssb.formatPublicKey peer1
- -- <> " <-> "
- -- <> Ssb.formatPublicKey peer2
let tunnel = newTunnel peer1 peer2
exists <- atomically $ do
@@ -243,7 +237,7 @@ connect room stream req = do
maybeToRight errPeerNotAvailable mPeer
case peerConn of
Left err -> do
- print $ "errorr! " <> err
+ putStrLn $ "room error: " <> err
return $ Left err
Right conn -> RPC.request conn (rpcRequest req)
$ \peerStream -> createTunnel room (stream, peerStream)