diff options
author | Joey Hess <joey@kitenet.net> | 2013-12-06 22:18:58 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-12-06 22:18:58 -0400 |
commit | bd0e14f5d428a7144626c4a4d58f543fd29e271d (patch) | |
tree | bdcb022bb7912ae828fb6e57f0c30193d3c69ab7 /Utility | |
parent | 6a094efd3bb743118db698fab2c0cc7c502ae55c (diff) |
add withSocketsDo to hopefully appease the windows crash report gods
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/WebApp.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Utility/WebApp.hs b/Utility/WebApp.hs index 4176d418d..225021b2e 100644 --- a/Utility/WebApp.hs +++ b/Utility/WebApp.hs @@ -39,6 +39,7 @@ import Control.Concurrent #ifdef __ANDROID__ import Data.Endian #endif +import Network.Socket (withSocketsDo) localhost :: HostName localhost = "localhost" @@ -68,7 +69,7 @@ browserProc url = proc "xdg-open" [url] - such as start a web browser to view the webapp. -} runWebApp :: Maybe HostName -> Wai.Application -> (SockAddr -> IO ()) -> IO () -runWebApp h app observer = do +runWebApp h app observer = withSocketsDo $ do sock <- getSocket h void $ forkIO $ runSettingsSocket webAppSettings sock app sockaddr <- fixSockAddr <$> getSocketName sock |