From dd39bdc8c23734f35fbf3bc3250ee3ff03724772 Mon Sep 17 00:00:00 2001 From: Haskell Guy Date: Thu, 28 May 2020 14:59:58 +0200 Subject: 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. --- src/Ssb/Peer/RPC/Room.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Ssb') 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 $ () -- cgit v1.2.3