Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shrapnel
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
shrapnel
Commits
f70fcfc8
Commit
f70fcfc8
authored
Jul 08, 2013
by
Sam Rushing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accept_many: simplify [issue 46]
parent
3826925f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
coro/socket.pyx
coro/socket.pyx
+6
-9
No files found.
coro/socket.pyx
View file @
f70fcfc8
...
...
@@ -1062,7 +1062,7 @@ cdef public class sock [ object sock_object, type sock_type ]:
cdef
coro
me
cdef
list
result
count
=
0
result
=
PyList_New
(
max
)
result
=
[]
if
max
==
0
:
upper_limit
=
0x7ffffffe
else
:
...
...
@@ -1075,19 +1075,16 @@ cdef public class sock [ object sock_object, type sock_type ]:
r
=
accept
(
self
.
fd
,
<
sockaddr
*>&
sa
,
&
addr_len
)
if
r
==
-
1
:
if
errno
.
errno
==
errno
.
EAGAIN
:
return
result
[:
count
]
return
result
elif
errno
.
errno
==
errno
.
ECONNABORTED
:
pass
else
:
raise_oserror
()
else
:
element
=
(
sock
(
self
.
domain
,
fd
=
r
),
self
.
unparse_address
(
&
sa
,
addr_len
)
)
if
max
==
0
:
result
.
append
(
element
)
else
:
result
[
count
]
=
element
result
.
append
((
sock
(
self
.
domain
,
fd
=
r
),
self
.
unparse_address
(
&
sa
,
addr_len
)
))
count
=
count
+
1
return
result
...
...
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