summaryrefslogtreecommitdiff
path: root/Utility/WebApp.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utility/WebApp.hs')
-rw-r--r--Utility/WebApp.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Utility/WebApp.hs b/Utility/WebApp.hs
index d3bd523a8..51300c9cf 100644
--- a/Utility/WebApp.hs
+++ b/Utility/WebApp.hs
@@ -54,14 +54,14 @@ runBrowser url env = boolSystemEnv cmd [Param url] env
{- Binds to a socket on localhost, and runs a webapp on it.
-
- - An IO action can also be run, to do something with the port number,
+ - An IO action can also be run, to do something with the address,
- such as start a web browser to view the webapp.
-}
-runWebApp :: Wai.Application -> (PortNumber -> IO ()) -> IO ()
+runWebApp :: Wai.Application -> (SockAddr -> IO ()) -> IO ()
runWebApp app observer = do
sock <- localSocket
void $ forkIO $ runSettingsSocket defaultSettings sock app
- observer =<< socketPort sock
+ observer =<< getSocketName sock
{- Binds to a local socket, selecting any free port.
-