#2927: Bug in network library, uncaught exception when dealing with ipv6 sockets
-------------------------------+--------------------------------------------
Reporter: tphyahoo | Owner: bos
Type: bug | Status: assigned
Priority: normal | Milestone:
Component: libraries/network | Version: 6.10.1
Severity: normal | Resolution:
Keywords: ipv6 | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-------------------------------+--------------------------------------------
Comment (by tphyahoo):
Yes, not a very good patch I agree. I had an uncaught exception error a
couple of days after I implemented.
Anyway, here's a tweaked patch, which at least fixes that.
{{{
< (Just peer, _) <- getNameInfo [] True False addr
---
> (Just peer) <-
> catchIO ( return . fst =<< getNameInfo [] True False addr )
> (\e -> case addr of
> SockAddrInet port haddr -> return . Just =<<
inet_ntoa haddr
> SockAddrInet6 port flow haddr6 scope -> return .
Just . show $ haddr6
> SockAddrUnix x -> return . Just $ x
> )
>
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2927#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs