Bugs item #1151968, was opened at 2005-02-25 19:00 Message generated for change (Comment added) made by jonsv322 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1151968&group_id=5470
Category: Windows Group: Platform-specific Status: Open Resolution: None Priority: 5 Submitted By: Jonas Widén (jonsv322) Assigned to: Nobody/Anonymous (nobody) Summary: (XMLRPC) multitude of sockets ending up in TIME_WAIT Initial Comment: 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 [EMAIL PROTECTED]: NOLINGER = struct.pack('HH', 1, 0) # Release the resource back to the system if socket closed In [EMAIL PROTECTED]: self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, NOLINGER) self.sock.close() # close it manually... there may be other refs ---------------------------------------------------------------------- >Comment By: Jonas Widén (jonsv322) Date: 2005-02-25 21:13 Message: Logged In: YES user_id=352221 Read section, SO_LINGER at following address: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/wspsetsockopt_2.asp ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1151968&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com