You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running on windows with code copied directly from example and docs one gets the potentially confusing error "getAddrInfo: does not exist (error 10093)".
The solution is to wrap the forkServer with:
withSocketsDo $ forkServer (BS8.pack "localhost") 8000
and also adding:
import Network.Socket (withSocketsDo)
This is best practice on all code, not only for Windows, since this adds Windows support without breaking anything on other platforms.
Proposed solution: adding withSocketsDo inside forkServer.
Change Line 224 in monitoring.hs to:
tid <- withSocketsDo $ forkIO $ startServer counters gauges labels host port
The text was updated successfully, but these errors were encountered:
Running on windows with code copied directly from example and docs one gets the potentially confusing error "getAddrInfo: does not exist (error 10093)".
This is a common (and misleading) error for all Haskell networking code on Windows (see http://hackage.haskell.org/trac/ghc/ticket/4454)
The solution is to wrap the forkServer with:
withSocketsDo $ forkServer (BS8.pack "localhost") 8000
and also adding:
import Network.Socket (withSocketsDo)
This is best practice on all code, not only for Windows, since this adds Windows support without breaking anything on other platforms.
Proposed solution: adding withSocketsDo inside forkServer.
Change Line 224 in monitoring.hs to:
tid <- withSocketsDo $ forkIO $ startServer counters gauges labels host port
The text was updated successfully, but these errors were encountered: