compiles and works again.

This commit is contained in:
2022-07-19 23:07:01 +02:00
parent 9e9fa9e512
commit 980c309281
9 changed files with 58 additions and 45 deletions

View File

@ -25,7 +25,7 @@ forkClient app = runRIO app $ withRunInIO $ \run -> withSocketsDo $ do
connPort <- readTVarIO $ twsConnectionRefsPort refs
atomically $ modifyTVar' cStatus (const TWSConnecting)
-- TODO: throws IO-Exeption instead of returning empty list -> handle!
addr:_ <- getAddrInfo (Just $ defaultHints { addrFlags = [AI_NUMERICHOST, AI_NUMERICSERV], addrProtocol = 0, addrSocketType = Stream}) (Just connHost) (Just connPort)
addr:_ <- getAddrInfo (Just $ defaultHints { addrFlags = [AI_NUMERICHOST, AI_NUMERICSERV], addrProtocol = 0, addrSocketType = Stream}) (Just $ T.unpack connHost) (Just $ T.unpack connPort)
run $ logDebug $ displayShow addr
E.bracketOnError (socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr)) close $ \sock -> do
connect sock $ addrAddress addr