[issue8506] SimpleXMLRPCServer Socket not closed after shutdown call

2010-08-05 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

The behavior is as documented, so this is a feature request.
The 3.1.2 doc in 20.19.2. Server Objects says
BaseServer.shutdown() 
Tells the serve_forever() loop to stop and waits until it does.

I presume this allows subsequent .handle_request() and ..serve_forever() calls, 
as well as others, so I think the request is a bad idea.

For automatic closing, use 'with' statements and a context manager and checkout 
contextlib. This is their main purpose.

I am not sure what
The server classes support the following class variables:
BaseServer.allow_reuse_address 
Whether the server will allow the reuse of an address. This defaults to False, 
and can be set in subclasses to change the policy. 
or whether it would help you.

--
nosy: +terry.reedy
resolution:  - rejected
status: open - closed
type: behavior - feature request

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8506
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8506] SimpleXMLRPCServer Socket not closed after shutdown call

2010-04-27 Thread Santoso Wijaya

Changes by Santoso Wijaya santa@me.com:


--
nosy: +santa4nt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8506
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8506] SimpleXMLRPCServer Socket not closed after shutdown call

2010-04-23 Thread Erik Schweller

New submission from Erik Schweller othere...@gmail.com:

Calling shutdown on a SimpleXMLRPCServer will stop the server but does not 
close the socket, meaning new connections to the same address will fail. 

Example:

  srv = SimpleXMLRPCServer((ip, port),
  logRequests=False, allow_none=True)
  srv.serve_forever(poll_interval=2)


srv.shutdown() is made available to the registered class instance.


The current workaround is to delete the socket (or call close() on the socket) 
after the server is shutdown, (i.e., del srv.socket) but it seems this should 
be handled when the server is shutdown.

--
components: Library (Lib)
messages: 104009
nosy: othererik
severity: normal
status: open
title: SimpleXMLRPCServer Socket not closed after shutdown call
type: behavior
versions: Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8506
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com