joyent/libuv — pull request #823 by Raulmsm (2013-06-03 20:53:09+00:00)
Title: Windows: Return EADDRNOTAVAIL when all the ports have been exhausted

When several connections are opened to the same host on the same port
on a very short time-span, all the ports will be exhausted and the
error returned is ENOBUFS. I think this error is misleading as I
immediately thought it was related to memory exhaustion on socket
buffers. A google search showed that there are more people assuming the
same.

The error I would expect for this case would be EADDRNOTAVAIL. While it
is still not perfect, I believe it's a stronger indication of the
underlying problem.