'Disconnect from server.
Args:
reason (str): Motivation for the disconnect.'

def disconnect(self, reason='Server    disconnected.'):

    self.client.lineSend(self.csessid, ['connection_close', [reason], {}])
    self.client.client_disconnect(self.csessid)
    self.sessionhandler.disconnect(self)
