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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
eta
gajim
Commits
b0aeefcb
Commit
b0aeefcb
authored
16 years ago
by
Brendan Taylor
Browse files
Options
Downloads
Patches
Plain Diff
flush xmpppy's send queue before disconnecting
parent
304da5e2
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
src/common/xmpp/transports_nb.py
+7
-0
7 additions, 0 deletions
src/common/xmpp/transports_nb.py
with
7 additions
and
0 deletions
src/common/xmpp/transports_nb.py
+
7
−
0
View file @
b0aeefcb
...
...
@@ -393,6 +393,11 @@ class NonBlockingTcp(PlugIn, IdleObject):
def
start_disconnect
(
self
,
to_send
,
on_disconnect
):
self
.
on_disconnect
=
on_disconnect
# flush the sendqueue
while
self
.
sendqueue
:
self
.
_do_send
()
self
.
sendqueue
=
[]
self
.
send
(
to_send
)
self
.
send
(
'
</stream:stream>
'
)
...
...
@@ -596,6 +601,7 @@ class NonBlockingTcp(PlugIn, IdleObject):
'''
Append raw_data to the queue of messages to be send.
If supplied data is unicode string, encode it to utf-8.
'''
if
self
.
state
<=
0
:
return
r
=
raw_data
...
...
@@ -608,6 +614,7 @@ class NonBlockingTcp(PlugIn, IdleObject):
self
.
_do_send
()
else
:
self
.
sendqueue
.
append
(
r
)
self
.
_plug_idle
()
def
_on_send
(
self
):
...
...
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