parameters: (self, msg)
docstring: Handles a disconnect response.
docstring_summary: Handles a disconnect response.
docstring_tokens: Handles a disconnect response .
function: def _meta_disconnect(self, msg):
          '''Handles a disconnect response.'''
          if msg['successful']:
              try:
                  self._state = self.STATE_DISCONNECTED
                  self.on_disconnect(msg)
              finally:
                  # close connection
                  self._transport.close()                
          else:
              try:
                  self.on_error(msg)
              finally:
                  # close connection
                  self._transport.close()
function_tokens: def _meta_disconnect ( self , msg ) : if msg [ 'successful' ] : try : self . _state = self . STATE_DISCONNECTED self . on_disconnect ( msg ) finally : # close connection self . _transport . close ( ) else : try : self . on_error ( msg ) finally : # close connection self . _transport . close ( )