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
d008b51b
Commit
d008b51b
authored
18 years ago
by
dkirov
Browse files
Options
Downloads
Patches
Plain Diff
updated connect error checks
parent
0291b50f
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/proxy65_manager.py
+12
-9
12 additions, 9 deletions
src/common/proxy65_manager.py
with
12 additions
and
9 deletions
src/common/proxy65_manager.py
+
12
−
9
View file @
d008b51b
...
...
@@ -15,6 +15,7 @@
##
import
socket
import
struct
import
errno
import
common.xmpp
from
common
import
gajim
...
...
@@ -246,16 +247,18 @@ class HostTester(Socks5, IdleObject):
self
.
_recv
=
self
.
_sock
.
recv
except
Exception
,
ee
:
(
errnum
,
errstr
)
=
ee
if
errnum
==
111
:
self
.
on_failure
()
return
None
if
errnum
in
(
errno
.
EINPROGRESS
,
errno
.
EALREADY
,
errno
.
EWOULDBLOCK
):
# still trying to connect
return
# win32 needs this
elif
errnum
!=
10056
or
self
.
state
!=
0
:
return
None
else
:
# socket is already connected
self
.
_sock
.
setblocking
(
False
)
self
.
_send
=
self
.
_sock
.
send
self
.
_recv
=
self
.
_sock
.
recv
if
errnum
not
in
(
0
,
10056
,
errno
.
EISCONN
):
# connection failed
self
.
on_failure
()
return
# socket is already connected
self
.
_sock
.
setblocking
(
False
)
self
.
_send
=
self
.
_sock
.
send
self
.
_recv
=
self
.
_sock
.
recv
self
.
buff
=
''
self
.
state
=
1
# connected
self
.
idlequeue
.
plug_idle
(
self
,
True
,
False
)
...
...
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