aboutsummaryrefslogtreecommitdiff
path: root/src/Ssb/Peer/RPC
diff options
context:
space:
mode:
authorHaskell Guy <haskell.guy@localhost>2020-05-28 14:59:58 +0200
committerHaskell Guy <haskell.guy@localhost>2020-05-28 14:59:58 +0200
commitdd39bdc8c23734f35fbf3bc3250ee3ff03724772 (patch)
tree2954bfe79f861898db76b56ac856fa9d223fc517 /src/Ssb/Peer/RPC
parent7e6e3e3ebd61b2e095f32bd8d5d4c93ff66e3108 (diff)
downloadssb-haskell-dd39bdc8c23734f35fbf3bc3250ee3ff03724772.tar.xz
Fix Room hosting
- Use the correct RPC handler for when the 'host-room' command is used. - Avoid making clients hang up by returning OK when the rpc endpoint call is unknown.
Diffstat (limited to 'src/Ssb/Peer/RPC')
-rw-r--r--src/Ssb/Peer/RPC/Room.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Ssb/Peer/RPC/Room.hs b/src/Ssb/Peer/RPC/Room.hs
index 0b85414..62dd6dc 100644
--- a/src/Ssb/Peer/RPC/Room.hs
+++ b/src/Ssb/Peer/RPC/Room.hs
@@ -315,7 +315,9 @@ instance RPC.Handler Room where
resp <- getCurrentTime
RPC.writeStreamJSON stream resp
- serve room endpoint@otherwise arg stream = (RPC.notFoundHandlerFunc endpoint) arg stream
+ -- HACK: return OK when endpoint not known to avoid disconnecting clients
+ serve room endpoint@otherwise arg stream = return . return ()
+ --serve room endpoint@otherwise arg stream = (RPC.notFoundHandlerFunc endpoint) arg stream
notifyConnect _ _ = return . return $ ()