Antoine Pitrou added the comment: > Looks to me like python grabs an outgoing port number via unrandom means
Python does not grab an outgoing port number, its lets the OS choose one (via connect()). The only thing to watch out for would be whether you let many connections open (perhaps there's a per-process limit that is reached). > Which, if I'm understanding the code correctly, returns the source > address used to make the connection in this instance. getaddrinfo() does not do that. It is simply a wrapper around the C runtime library's getaddrinfo(), for which you can find information on the Web (for both the Windows and POSIX versions of it). > If windows is responsible for giving the bad port number, I would argue > that Python still needs to account for the problem since this is obviously > a major issue if it happens to someone. It might be a major issue for whoever encounters the issue but, as Martin said, Python cannot do anything else than bubble up the exception for you to handle. Since this seems to be a fairly involved Windows issue (rather than a Python bug), I suggest you ask for help on a help forum with Windows experts. ---------- status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15779> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com