Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3c28878e
Commit
3c28878e
authored
Apr 07, 2015
by
Victor Stinner
Browse files
Options
Browse Files
Download
Plain Diff
Merge 3.4 (asyncio)
parents
15154504
c9d11c34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
Lib/asyncio/selector_events.py
Lib/asyncio/selector_events.py
+6
-8
No files found.
Lib/asyncio/selector_events.py
View file @
3c28878e
...
...
@@ -408,14 +408,12 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
def
_sock_connect
(
self
,
fut
,
sock
,
address
):
fd
=
sock
.
fileno
()
try
:
while
True
:
try
:
sock
.
connect
(
address
)
except
InterruptedError
:
continue
else
:
break
except
BlockingIOError
:
sock
.
connect
(
address
)
except
(
BlockingIOError
,
InterruptedError
):
# Issue #23618: When the C function connect() fails with EINTR, the
# connection runs in background. We have to wait until the socket
# becomes writable to be notified when the connection succeed or
# fails.
fut
.
add_done_callback
(
functools
.
partial
(
self
.
_sock_connect_done
,
fd
))
self
.
add_writer
(
fd
,
self
.
_sock_connect_cb
,
fut
,
sock
,
address
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment