# HG changeset patch # User Goffi # Date 1447953335 -3600 # Node ID a34d7f621944ef9bf9f144ae57b1a7573d84cf2c # Parent e9936fcfaf91061ceb76e8baf4c205193504bbc7 plugin XEP-0065: renamed _killSession to killSession as it make sense to kill a session from an other plugin diff -r e9936fcfaf91 -r a34d7f621944 src/plugins/plugin_xep_0065.py --- a/src/plugins/plugin_xep_0065.py Thu Nov 19 18:15:27 2015 +0100 +++ b/src/plugins/plugin_xep_0065.py Thu Nov 19 18:15:35 2015 +0100 @@ -849,7 +849,6 @@ # should be already sorted, but just in case the priorities get weird candidates.sort(key=lambda c: c.priority, reverse=True) - defer.returnValue(candidates) def _addConnector(self, connector, candidate): @@ -950,7 +949,7 @@ session = self.getSession(session_hash, client.profile) session[DEFER_KEY].errback(exceptions.TimeOutError) - def _killSession(self, reason, session_hash, sid, client): + def killSession(self, reason, session_hash, sid, client): """Clean the current session @param session_hash(str): hash as returned by getSessionHash @@ -1103,7 +1102,7 @@ else: session_hash = getSessionHash(to_jid, client.jid, sid) session_d = defer.Deferred() - session_d.addBoth(self._killSession, session_hash, sid, client) + session_d.addBoth(self.killSession, session_hash, sid, client) session_data = client._s5b_sessions[session_hash] = { DEFER_KEY: session_d, TIMER_KEY: reactor.callLater(TIMEOUT, self._timeOut, session_hash, client), @@ -1156,7 +1155,7 @@ client = self.host.getClient(profile) assert session_hash not in client._s5b_sessions session_d = defer.Deferred() - session_d.addBoth(self._killSession, session_hash, None, client) + session_d.addBoth(self.killSession, session_hash, None, client) session_data = client._s5b_sessions[session_hash] = { "file": file_obj, DEFER_KEY: session_d,