mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 05:53:22 +00:00
bindaddr raises ValueError exception instead of OSError
This commit is contained in:
@@ -456,7 +456,7 @@ proc bindAddr*(socket: AsyncSocket, port = Port(0), address = "") {.
|
||||
of AF_INET6: realaddr = "::"
|
||||
of AF_INET: realaddr = "0.0.0.0"
|
||||
else:
|
||||
raise newException(OSError,
|
||||
raise newException(ValueError,
|
||||
"Unknown socket address family and no address specified to bindAddr")
|
||||
|
||||
var aiList = getAddrInfo(realaddr, port, socket.domain)
|
||||
|
||||
Reference in New Issue
Block a user