I am trying to use a stream socket server
self.server = SocketServer.ThreadingTCPServer( ( HOST, PORT ), MCRequestHandler )
and destructor
def __del__( self ): self.server.shutdown(); self.server.server_close() print( 'Server closed ! ' );
When I close the GUI, the del function is called, but if I want to run the program again, I get the following error message
socket.error: [Errno 98] Address already in use Exception AttributeError: "'MCCommunication' object has no attribute 'server'" in <bound method MCCommunication.__del__ of <MCCommunication.MCCommunication object at 0x26867c0>> ignored
source share