plugin XEP-0198: Fix disconnecting of component profile:
- There is not need to use stream management with component, so we set mode to `client` only. - `_disconnecting_trigger` was causing an exception when disconnecting a component, it is now disabled in this case.
This commit is contained in:
parent
5c1326c8e4
commit
90c6f11415
1 changed files with 3 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ PLUGIN_INFO = {
|
|||
C.PI_NAME: "Stream Management",
|
||||
C.PI_IMPORT_NAME: "XEP-0198",
|
||||
C.PI_TYPE: "XEP",
|
||||
C.PI_MODES: C.PLUG_MODE_BOTH,
|
||||
C.PI_MODES: [C.PLUG_MODE_CLIENT],
|
||||
C.PI_PROTOCOLS: ["XEP-0198"],
|
||||
C.PI_DEPENDENCIES: [],
|
||||
C.PI_RECOMMENDATIONS: ["XEP-0045", "XEP-0313"],
|
||||
|
|
@ -202,6 +202,8 @@ class XEP_0198(object):
|
|||
return True
|
||||
|
||||
def _disconnecting_trigger(self, client):
|
||||
if client.is_component:
|
||||
return True
|
||||
session = client._xep_0198_session
|
||||
if session.enabled:
|
||||
self.send_ack(client)
|
||||
|
|
|
|||
Loading…
Reference in a new issue