#NEWLINE# def connectionLost( self , reason = None ) : #NEWLINE# #INDENT# '\n        This is executed when the connection is lost for whatever\n        reason. It can also be called directly, from the disconnect\n        method.\n\n        Args:\n            reason (str): Motivation for loosing connection.\n\n        ' #NEWLINE# insults . TerminalProtocol . connectionLost ( self , reason ) #NEWLINE# self . sessionhandler . disconnect ( self ) #NEWLINE# self . terminal . loseConnection ( )