Exiting SocketServer: socket.error: (98, 'Address already in use')

Andrew Dalke dalke at dalkescientific.com
Mon May 30 18:13:48 EDT 2005


Magnus Lyckå wrote:
> Why doesn't my socket
> get released by the OS when I exit via my handle_error?

Hi Magnus,

  I wrote about this at
http://www.dalkescientific.com/writings/diary/archive/2005/04/21/using_xmlrpc.html

The reason for it is described at
  http://hea-www.harvard.edu/~fine/Tech/addrinuse.html

You can set the class variable "allow_reuse_address = True" in
your derived ExitableSocketServer to get the behaviour you
expect, at the expense of some problems mentioned in the
above URL.

				Andrew
				dalke at dalkescientific.com




More information about the Python-list mailing list