Reconnect to different address in twisted?
问题 I have a server that sends my client the address of a backup server in case it goes down. On the server side the backup server is running. On the client side once the connection is lost I am not able to make the client to connect to the backup server. I know that I have to add the connection logic to the following callback in twisted.internet.protcol.Protocol class MyProtocol(Protocol): def connectionLost(self, reason): print 'Connection Lost' print 'Trying to reconnect' # How do I reconnect