bindaddr raises ValueError exception instead of OSError

This commit is contained in:
def
2016-01-26 15:46:36 +01:00
parent ce69f1e037
commit c10d963e85

View File

@@ -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)