def close(self):
        if (self._closed):
            Log.debug("already closed. ignore")
            return
        self._closed = True
        Log.info("%s: session end" % unicode(self.authJID))
        if (self._session):
            self._session.Unregister()
        self.unbind_res()
        self.rosters.unregister_conn(self)
dataset/ETHPy150Open HenryHu/pybbs/xmppserver.py/XMPPServer.close/original