Message136804
On May 24, 2011, at 12:44 PM, Charles-François Natali wrote:
> I don't know how I could miss this: closing the server socket is perfectly fine in TCP, since a new one is returned by accept(). But in UDP, it's definitely wrong, since it's used by the handler.
> I don't know however how I missed this, since I remember having run test_socketserver...
It's been a long time since the issue submitted, anyway, I was cursed to look at only TCP too :-)
I agree that ForkingUDPServer should be supported in SocketServer.py.
(Although users should take care of socket locking for concurrent accesses)
How about using BaseServer(TCPServer).server_close() instead of self.socket.close() in the patch?
As UDPServer has no server_close() method overridden, unlike ForkingTCPServer, ForkingUDPServer seems to have no actual "server" in design.
So, I think we could say that
- closing TCP listen socket in child process = "server_close()" in child process
- nothing to do on UDP socket in child process = "server_close() but nothing will be done in the method" (b/c BaseServer.server_close() does nothing)
What do you think?
-----
Donghyun Kim
http://www.uryan.net |
File name |
Uploaded |
unnamed
|
ryan003,
2011-05-24.22:58:13
|
|
Date |
User |
Action |
Args |
2011-05-24 22:58:15 | ryan003 | set | recipients:
+ ryan003, pitrou, vstinner, benjamin.peterson, victorpoluceno, neologix, python-dev |
2011-05-24 22:58:14 | ryan003 | link | issue5715 messages |
2011-05-24 22:58:14 | ryan003 | create | |
|