Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mesonium
gajim
Commits
dce40846
Commit
dce40846
authored
4 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Client: Unregister modules when account is disabled
parent
fe82e887
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gajim/common/client.py
+4
-8
4 additions, 8 deletions
gajim/common/client.py
with
4 additions
and
8 deletions
gajim/common/client.py
+
4
−
8
View file @
dce40846
...
...
@@ -79,7 +79,6 @@ def __init__(self, account):
self
.
available_transports
=
{}
# Register all modules
modules
.
register_modules
(
self
)
self
.
_create_client
()
...
...
@@ -162,7 +161,9 @@ def _create_client(self):
self
.
_client
.
subscribe
(
'
stanza-sent
'
,
self
.
_on_stanza_sent
)
self
.
_client
.
subscribe
(
'
stanza-received
'
,
self
.
_on_stanza_received
)
self
.
_register_new_handlers
()
for
handler
in
modules
.
get_handlers
(
self
):
self
.
_client
.
register_handler
(
handler
)
self
.
handlers_registered
=
True
def
process_ssl_errors
(
self
):
if
not
self
.
_ssl_errors
:
...
...
@@ -372,11 +373,6 @@ def change_status(self, show, msg, auto=False):
app
.
nec
.
push_incoming_event
(
OurShowEvent
(
None
,
conn
=
self
,
show
=
show
))
def
_register_new_handlers
(
self
):
for
handler
in
modules
.
get_handlers
(
self
):
self
.
_client
.
register_handler
(
handler
)
self
.
handlers_registered
=
True
def
get_module
(
self
,
name
):
return
modules
.
get
(
self
.
_account
,
name
)
...
...
@@ -522,7 +518,7 @@ def _disable_reconnect_timer(self):
self
.
_reconnect_timer_source
=
None
def
cleanup
(
self
):
pass
modules
.
unregister_modules
(
self
)
def
quit
(
self
,
kill_core
):
if
kill_core
and
self
.
_state
in
(
ClientState
.
CONNECTING
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment