Revert removal of raiseOSError
This commit is contained in:
parent
bf8e371d7e
commit
62955292f2
1 changed files with 1 additions and 2 deletions
|
|
@ -456,8 +456,7 @@ proc bindAddr*(socket: AsyncSocket, port = Port(0), address = "") {.
|
||||||
of AF_INET6: realaddr = "::"
|
of AF_INET6: realaddr = "::"
|
||||||
of AF_INET: realaddr = "0.0.0.0"
|
of AF_INET: realaddr = "0.0.0.0"
|
||||||
else:
|
else:
|
||||||
raise newException(ValueError,
|
raiseOSError("Unknown socket address family and no address specified to bindAddr")
|
||||||
"Unknown socket address family and no address specified to bindAddr")
|
|
||||||
|
|
||||||
var aiList = getAddrInfo(realaddr, port, socket.domain)
|
var aiList = getAddrInfo(realaddr, port, socket.domain)
|
||||||
if bindAddr(socket.fd, aiList.ai_addr, aiList.ai_addrlen.Socklen) < 0'i32:
|
if bindAddr(socket.fd, aiList.ai_addr, aiList.ai_addrlen.Socklen) < 0'i32:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue