refactor: correct admin server port setting

For admin server, port server-setting was set to the same port as
app server port. This doesn't have any effect because it is overridden
by the already initialized admin server socket, but it's better to
explicitly correct it to avoid anything unexpected.

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
Taimoor Zaeem
2026-06-23 23:05:02 +05:00
parent f5fd2e71b6
commit 9e0f9bc4ee
2 changed files with 14 additions and 4 deletions
+6 -2
View File
@@ -106,7 +106,12 @@ run appState = do
address <- resolveSocketToAddress mainSocket
observer $ AppServerAddressObs address
Warp.runSettingsSocket (serverSettings conf & setOnException onWarpException) mainSocket app
let
appServerSettings = serverSettings conf
& setPort (configServerPort conf)
& setOnException onWarpException
Warp.runSettingsSocket appServerSettings mainSocket app
where
observer = AppState.getObserver appState
@@ -129,7 +134,6 @@ serverSettings :: AppConfig -> Warp.Settings
serverSettings AppConfig{..} =
defaultSettings
& setHost (fromString $ toS configServerHost)
& setPort configServerPort
& setServerName ("postgrest/" <> prettyVersion)
-- | PostgREST application