I've the following subclass of SocketServer.TCPServer
:
class MP3Server (SocketServer.TCPServer):
def __init__(self, server_address, RequestHandlerClass, SoundObj, DocRoot):
self.allow_reuse_address = True
SocketServer.TCPServer.__init__(self,
server_address,
RequestHandlerClass)
Before initializing I'm setting self.allow_reuse_address
to True
. But, still, when I stop and restart my server, I get the error about the address which is already in use.
I've also tried to change that line into SocketServer.TCPServer.allow_reuse_address = True
, but it doesn't work the same (and to be honest I didn't expect different with this second solution).