#NEWLINE# def _mqtt_disconnect( self , client , userdata , rc ) : #NEWLINE# #INDENT# logger . debug ( 'Client on_disconnect called.' ) #NEWLINE# self . _connected = False #NEWLINE# if ( rc != 0 ) : #NEWLINE# #INDENT# logger . debug ( 'Unexpected disconnect with rc: {0}' . format ( self ) ) #NEWLINE# #UNINDENT# if ( self . on_disconnect is not None ) : #NEWLINE# #INDENT# self . on_disconnect ( self )