aboutsummaryrefslogtreecommitdiff
path: root/src/Ssb/Peer/TCP.hs
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/TCP.hs
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/TCP.hs')
-rw-r--r--src/Ssb/Peer/TCP.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Ssb/Peer/TCP.hs b/src/Ssb/Peer/TCP.hs
index 27e3f07..59d7f81 100644
--- a/src/Ssb/Peer/TCP.hs
+++ b/src/Ssb/Peer/TCP.hs
@@ -51,12 +51,12 @@ serveBoxStream host port networkID id cmd =
networkID
id
case res of
- Left err -> print $ "client handshake error: " <> err
+ Left err -> putStrLn $ "client handshake error: " <> err
Right sharedSecrets -> do
let peerID = (fromMaybe undefined $ SH.secretA sharedSecrets)
conn <- BoxStream.connectServer socket sharedSecrets
case conn of
- Left err -> print $ "client error: " <> err
+ Left err -> putStrLn $ "client error: " <> err
Right conn -> cmd conn (Ssb.Identity Nothing peerID)
connectRPC
@@ -96,5 +96,5 @@ serveRPC handler host port networkID id =
serveBoxStream host port networkID id $ \conn peer -> do
res <- RPC.connect conn handler (Ssb.publicKey peer) (\_ -> return ())
case res of
- Left err -> print $ "RPC error serving client: " <> err
+ Left err -> putStrLn $ "RPC error serving client: " <> err
Right _ -> return ()