deprecated nativesockets.dealloc, use freeAddrInfo instead; fixed stdlib deprecations
This commit is contained in:
parent
9f6f78ac61
commit
76eb20d2d3
6 changed files with 35 additions and 33 deletions
|
|
@ -603,9 +603,9 @@ proc bindAddr*(socket: AsyncSocket, port = Port(0), address = "") {.
|
|||
|
||||
var aiList = getAddrInfo(realaddr, port, socket.domain)
|
||||
if bindAddr(socket.fd, aiList.ai_addr, aiList.ai_addrlen.Socklen) < 0'i32:
|
||||
dealloc(aiList)
|
||||
freeAddrInfo(aiList)
|
||||
raiseOSError(osLastError())
|
||||
dealloc(aiList)
|
||||
freeAddrInfo(aiList)
|
||||
|
||||
proc close*(socket: AsyncSocket) =
|
||||
## Closes the socket.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue