fixed exit on http-port not set

This commit is contained in:
Dmitry Zuikov 2023-10-21 17:40:28 +03:00
parent eb6d755297
commit 983f24ef78
2 changed files with 5 additions and 2 deletions

View File

@ -2,6 +2,7 @@
module HttpWorker where
import HBS2.Prelude
import HBS2.Clock
import HBS2.Actors.Peer
import HBS2.Storage
import HBS2.Data.Types.Refs
@ -10,6 +11,8 @@ import HBS2.Net.Proto.Types
import HBS2.Net.Proto.RefLog
import HBS2.Events
import HBS2.System.Logger.Simple
import PeerTypes
import PeerConfig
import RefLog ( doRefLogBroadCast )
@ -109,5 +112,6 @@ httpWorker (PeerConfig syn) pmeta e = do
Nothing -> status status500
Just h -> text [qc|{pretty h}|]
pure ()
warn "http port not set"
forever $ pause @'Seconds 600

View File

@ -572,7 +572,6 @@ runPeer opts = U.handle (\e -> myException e
let debugConf = runReader (cfgValue @PeerDebugKey) syn :: FeatureSwitch
let trace1Conf = runReader (cfgValue @PeerTrace1Key) syn :: FeatureSwitch
let helpFetchKeys = runReader (cfgValue @PeerProxyFetchKey) syn & toKeys
let useHttpDownload = runReader (cfgValue @PeerUseHttpDownload) syn & (== FeatureOn)
let tcpListen = runReader (cfgValue @PeerListenTCPKey) syn & fromMaybe ""
let tcpProbeWait = runReader (cfgValue @PeerTcpProbeWaitKey) syn
& fromInteger @(Timeout 'Seconds) . fromMaybe 300