plugin XEP-0065: renamed _killSession to killSession as it make sense to kill a session from an other plugin
This commit is contained in:
parent
9dcb6d266a
commit
b41188822d
1 changed files with 3 additions and 4 deletions
|
|
@ -849,7 +849,6 @@ class XEP_0065(object):
|
|||
|
||||
# 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 @@ class XEP_0065(object):
|
|||
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 @@ class XEP_0065(object):
|
|||
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 @@ class XEP_0065(object):
|
|||
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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue