File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 71
71
async def async_sendall (sock : Union [socket .socket , _sslConn ], buf : bytes ) -> None :
72
72
timeout = sock .gettimeout ()
73
73
sock .settimeout (0.0 )
74
+ sock .setsockopt (socket .SOL_SOCKET , socket .SOCK_NONBLOCK , 1 )
74
75
loop = asyncio .get_event_loop ()
75
76
try :
76
77
if _HAVE_SSL and isinstance (sock , (SSLSocket , _sslConn )):
@@ -258,6 +259,7 @@ async def async_receive_data(
258
259
timeout = sock_timeout
259
260
260
261
sock .settimeout (0.0 )
262
+ sock .setsockopt (socket .SOL_SOCKET , socket .SOCK_NONBLOCK , 1 )
261
263
loop = asyncio .get_event_loop ()
262
264
cancellation_task = asyncio .create_task (_poll_cancellation (conn ))
263
265
try :
@@ -288,6 +290,7 @@ async def async_receive_data_socket(
288
290
timeout = sock_timeout
289
291
290
292
sock .settimeout (0.0 )
293
+ sock .setsockopt (socket .SOL_SOCKET , socket .SOCK_NONBLOCK , 1 )
291
294
loop = asyncio .get_event_loop ()
292
295
try :
293
296
if _HAVE_SSL and isinstance (sock , (SSLSocket , _sslConn )):
You can’t perform that action at this time.
0 commit comments