deprecated nativesockets.dealloc, use freeAddrInfo instead; fixed stdlib deprecations

This commit is contained in:
Andreas Rumpf 2017-01-30 08:50:51 +01:00
commit 76eb20d2d3
6 changed files with 35 additions and 33 deletions

View file

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