aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Main.hs2
-rw-r--r--src/Ssb/Peer/RPC/Room.hs4
2 files changed, 4 insertions, 2 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 47d86c7..a9a05f9 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -109,7 +109,7 @@ hostRoomCMD name desc hostname = do
Room.Invite { host = hostname, port = "8008", key = publicKey me }
putStrLn $ "Hosting room for '" <> Room.formatInvite roomInvite <> "'"
- router <- defaultHandler
+ router <- Room.newRoom name desc
TCP.serveRPC router hostname (Room.port roomInvite) mainNet me
parser :: Options.Parser Command
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 $ ()