diff --git a/pkg/hs/urbit-king/lib/Urbit/King/Main.hs b/pkg/hs/urbit-king/lib/Urbit/King/Main.hs index 52103ed681..eeb4b806e0 100644 --- a/pkg/hs/urbit-king/lib/Urbit/King/Main.hs +++ b/pkg/hs/urbit-king/lib/Urbit/King/Main.hs @@ -562,10 +562,13 @@ main = do CLI.CmdCon pier -> runAppLogFile $ connTerm pier runShips :: [(CLI.Run, CLI.Opts, Bool)] -> IO () -runShips [] = pure () -runShips [(r,o,b)] = runShip r o b -runShips ships = - error ("TODO: Support multiple ships: " <> ppShow ships) +runShips = \case + [] -> pure () + [(r, o, d)] -> runShip r o d + ships -> do + threads <- for ships $ \(r, o, _) -> asyncBound (runShip r o True) + atomically $ asum (void . waitCatchSTM <$> threads) + for_ threads cancel -------------------------------------------------------------------------------- diff --git a/pkg/hs/urbit-king/lib/Urbit/Vere/Pier.hs b/pkg/hs/urbit-king/lib/Urbit/Vere/Pier.hs index 06b2baeabd..2b0174e62d 100644 --- a/pkg/hs/urbit-king/lib/Urbit/Vere/Pier.hs +++ b/pkg/hs/urbit-king/lib/Urbit/Vere/Pier.hs @@ -253,7 +253,7 @@ pier (serf, log, ss) mStart = do atomically ded >>= \case Left (txt, exn) -> logError $ displayShow ("Somthing died", txt, exn) - Right tag -> logError $ displayShow ("something simply exited", tag) + Right tag -> logError $ displayShow ("Something simply exited", tag) atomically $ (Term.spin muxed) (Just "shutdown")