Commit Graph

57 Commits

Author SHA1 Message Date
Antoine Pitrou
a624040d72 Issue #2302: Fix a race condition in SocketServer.BaseServer.shutdown,
where the method could block indefinitely if called just before the
event loop started running.  This also fixes the occasional freezes
witnessed in test_httpservers.
2010-04-25 21:40:32 +00:00
Kristján Valur Jónsson
c71fae5ad7 http://bugs.python.org/issue6382
added the shutdown_request() which can perform shutdown before calling close.  This is needed for the ForkingMixIn because different close semantics are required for child and parent process.  shutdown_request(), for TCP servers, calls socket.shutdown() and then calls close_request().  Therefore, this is not an backwards incompatible change, since subclasses that continue to override close_request() continue to work.
2009-07-07 09:01:34 +00:00
Kristján Valur Jónsson
f5b8ea9128 http://bugs.python.org/issue6382
close_request() (which can send a socket.shutdown()) must be called by the child process in a forking server.  The parent must merely close the socket handle.
2009-07-05 20:56:57 +00:00
Kristján Valur Jónsson
b5faac73a4 http://bugs.python.org/issue6381
some platforms may raise ENOTCONN if the stack has disconnected the socket on behalf of the peer.
2009-07-03 23:07:07 +00:00
Kristján Valur Jónsson
e007860b8b http://bugs.python.org/issue6267
Cumulative patch to http and xmlrpc
2009-06-28 21:04:17 +00:00
Kristján Valur Jónsson
f1d11efb72 http://bugs.python.org/issue6192
Move the newly introduced disable_nagle_algorithm flag into the StreamRequestHandler, where it is more appropriate.
2009-06-24 09:17:04 +00:00
Kristján Valur Jónsson
afefcfd4bf http://bugs.python.org/issue6192
Add a feature to disable the Nagle algorithm on sockets in TCPServer
2009-06-07 16:43:23 +00:00
Neil Schemenauer
c9332fada6 Fix call to os.waitpid, it does not take keyword args. 2009-02-24 04:23:25 +00:00
Georg Brandl
e152a77d96 socketserver renaming reversal part 3: move the module into the right
place and fix all references to it.  Closes #2926.
2008-05-24 18:31:28 +00:00
Alexandre Vassalotti
fb9ce65a91 Renamed SocketServer to 'socketserver'.
Deprecated old name.
2008-05-12 01:37:10 +00:00
Jeffrey Yasskin
e75f59a578 Progress on issue #1193577 by adding a polling .shutdown() method to
SocketServers. The core of the patch was written by Pedro Werneck, but any bugs
are mine. I've also rearranged the code for timeouts in order to avoid
interfering with the shutdown poll.
2008-03-07 06:22:15 +00:00
Jeffrey Yasskin
392c159ad6 Prevent SocketServer.ForkingMixIn from waiting on child processes that it
didn't create, in most cases. When there are max_children handlers running, it
will still wait for any child process, not just handler processes.
2008-02-28 18:03:15 +00:00
Raymond Hettinger
1b5632445b Add diagnostic message to help figure-out why SocketServer tests occasionally crash
when trying to remove a pid that in not in the activechildren list.
2008-02-14 09:32:45 +00:00
Andrew M. Kuchling
e45a77adbe Patch #742598 from Michael Pomraning: add .timeout attribute to SocketServer that will call
.handle_timeout() method when no requests are received within the timeout period.
2008-01-19 16:26:13 +00:00
Tim Peters
ea5962f86e Whitespace normalization. 2007-03-12 18:07:52 +00:00
Collin Winter
ae04106a0e Patch #1599845: Add an option to disable the implicit calls to server_bind() and server_activate() in the constructors for TCPServer, SimpleXMLRPCServer and DocXMLRPCServer. 2007-03-10 14:41:48 +00:00
Collin Winter
22c42ba88c Bug #1531963: Make SocketServer.TCPServer's server_address always be equal to calling getsockname() on the server's socket.
Will backport.
2007-03-10 02:51:26 +00:00
Georg Brandl
ca5feabac2 bug [ 957505 ] SocketServer module documentation misleading 2005-07-18 07:38:44 +00:00
Guido van Rossum
ebbffd42f3 Fixed a typo in docstring I happened upon. 2005-04-30 00:20:35 +00:00
Raymond Hettinger
a617271dbd Use cStringIO where available. 2004-12-31 19:15:26 +00:00
Barry Warsaw
b97f0b7654 TCPServer: Fixed typo in class docstring. 2003-10-09 23:48:52 +00:00
Barry Warsaw
3aaad5079b TCPServer: Fixed typo in class docstring.
Backport candidate.
2003-10-09 22:44:05 +00:00
Anthony Baxter
4cedc1e84e Clearing out old patch queue. Patch #558547, make SocketServer more
robust. This makes socketserver's close() method callable repeatedly
without error - similar to other file-like objects.
2003-01-02 03:07:48 +00:00
Fred Drake
132e0e824b Use False instead of 0. 2002-11-22 14:22:49 +00:00
Martin v. Löwis
f86e8ef33e Patch #550765: Add daemon_threads flag. 2002-11-22 08:08:44 +00:00