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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
TSRh
gajim
Commits
e9755daa
Commit
e9755daa
authored
18 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
retry indefinitly is back. fixes #2411. please test that
parent
bf6f5dd1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/common/connection.py
+1
-2
1 addition, 2 deletions
src/common/connection.py
src/common/xmpp/client_nb.py
+2
-0
2 additions, 0 deletions
src/common/xmpp/client_nb.py
src/common/xmpp/transports_nb.py
+9
-5
9 additions, 5 deletions
src/common/xmpp/transports_nb.py
with
12 additions
and
7 deletions
src/common/connection.py
+
1
−
2
View file @
e9755daa
...
...
@@ -367,8 +367,7 @@ def connect_to_next_host(self, retry = False):
secure
=
self
.
_secure
)
return
else
:
if
not
retry
:
self
.
retrycount
=
0
if
not
retry
and
self
.
retrycount
==
0
:
self
.
time_to_reconnect
=
None
if
self
.
on_connect_failure
:
self
.
on_connect_failure
()
...
...
This diff is collapsed.
Click to expand it.
src/common/xmpp/client_nb.py
+
2
−
0
View file @
e9755daa
...
...
@@ -125,6 +125,8 @@ def _on_connected_failure(self, retry = None):
self
.
on_connect_failure
(
retry
)
def
_on_connected
(
self
):
# connect succeded, so no need of this callback anymore
self
.
on_connect_failure
=
None
self
.
connected
=
'
tcp
'
if
self
.
_Ssl
:
transports_nb
.
NonBlockingTLS
().
PlugIn
(
self
,
now
=
1
)
...
...
This diff is collapsed.
Click to expand it.
src/common/xmpp/transports_nb.py
+
9
−
5
View file @
e9755daa
...
...
@@ -143,11 +143,11 @@ def plugout(self):
def
pollin
(
self
):
self
.
_do_receive
()
def
pollend
(
self
):
def
pollend
(
self
,
retry
=
False
):
conn_failure_cb
=
self
.
on_connect_failure
self
.
disconnect
()
if
conn_failure_cb
:
conn_failure_cb
()
conn_failure_cb
(
retry
)
def
disconnect
(
self
):
if
self
.
state
==
-
2
:
# already disconnected
...
...
@@ -216,15 +216,19 @@ def _do_receive(self):
# "received" will be empty anyhow
if
errnum
==
socket
.
SSL_ERROR_WANT_READ
:
pass
elif
errnum
in
[
errno
.
ECONNRESET
,
errno
.
ENOTCONN
,
errno
.
ESHUTDOWN
]:
elif
errnum
==
errno
.
ECONNRESET
:
self
.
pollend
(
True
)
# don't proccess result, caus it will raise error
return
elif
errnum
in
[
errno
.
ENOTCONN
,
errno
.
ESHUTDOWN
]:
self
.
pollend
()
# don't proccess result, cas it will raise error
# don't proccess result, ca
u
s it will raise error
return
elif
not
received
:
if
errnum
!=
socket
.
SSL_ERROR_EOF
:
# 8 EOF occurred in violation of protocol
self
.
DEBUG
(
'
Socket error while receiving data
'
,
'
error
'
)
self
.
pollend
()
self
.
pollend
(
True
)
if
self
.
state
>=
0
:
self
.
disconnect
()
return
...
...
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