Handle a few error conditions.
Use Twisted ReconnectingClientFactory for automatic reconnections.