This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jonsv322
Recipients
Date 2005-02-25.18:00:50
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
A problem with a multitude of sockets ending up in
TIME_WAIT when stressing a system with XML-RPC calls.
This can cause a Windows network to missbehave.

A solution on Windows platform is to set the sockopt
NOLINGER with parameters (1, 0) for the socket before
the socket is closed. This vill cause that Windows will
release the socket direct without going into TIME_WAIT.

The solution in code:
In httplib.py@somewhere:
NOLINGER = struct.pack('HH', 1, 0) # Release the
resource back to the system if socket closed

In httplib.py@632:
self.sock.setsockopt(socket.SOL_SOCKET,
socket.SO_LINGER, NOLINGER)
self.sock.close()   # close it manually... there may be
other refs
History
Date User Action Args
2007-08-23 14:29:41adminlinkissue1151968 messages
2007-08-23 14:29:41admincreate