code: def clientConnectionFailed(self, connector, reason):
          
          print('Connection failed. Reason:', reason)        
          ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
docs: Connection failed