File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -1620,7 +1620,7 @@ cdef class Loop:
1620
1620
""" Remove a writer callback."""
1621
1621
self ._remove_writer(fd)
1622
1622
1623
- async def sock_recv(self , sock, n):
1623
+ def sock_recv (self , sock , n ):
1624
1624
""" Receive data from the socket.
1625
1625
1626
1626
The return value is a bytes object representing the data received.
@@ -1631,19 +1631,9 @@ cdef class Loop:
1631
1631
"""
1632
1632
if self ._debug and sock.gettimeout() != 0 :
1633
1633
raise ValueError (" the socket must be non-blocking" )
1634
-
1635
- try :
1636
- data = sock.recv(n)
1637
- except (BlockingIOError, InterruptedError):
1638
- pass
1639
- else :
1640
- IF DEBUG:
1641
- self ._sock_try_read_total += 1
1642
- return data
1643
-
1644
1634
fut = self ._new_future()
1645
1635
self ._sock_recv(fut, 0 , sock, n)
1646
- return await fut
1636
+ return fut
1647
1637
1648
1638
async def sock_sendall(self , sock, data):
1649
1639
""" Send data to the socket.
You can’t perform that action at this time.
0 commit comments