fix sorting and starting web sans ssl

This commit is contained in:
Lucy Cifferello
2021-01-19 15:45:24 -07:00
parent b1236bd52f
commit eb0df7f355
2 changed files with 5 additions and 4 deletions

View File

@@ -202,9 +202,10 @@ startWeb foundation = do
putStrLn @Text $ "Launching Tor Web Server on port " <> show torPort
torAction <- async $ runSettings (warpSettings torPort foundation) app
putStrLn @Text $ "Launching Web Server on port " <> show appPort
action <- async $ runTLS (tlsSettings sslCertLocation sslKeyLocation)
(warpSettings appPort foundation)
app
action <- if sslAuto
then async $ runTLS (tlsSettings sslCertLocation sslKeyLocation)
(warpSettings appPort foundation) app
else async $ runSettings (warpSettings appPort foundation) app
let actions = (action, torAction)
setWebProcessThreadId (join (***) asyncThreadId actions) foundation