mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
selector: jump out of the loop if there's nothing to wait on
This commit is contained in:
parent
825dcf867b
commit
a050b5a403
@ -69,6 +69,11 @@ class HTTPX::Selector
|
||||
|
||||
if @selectables.empty?
|
||||
@selectables = selectables
|
||||
|
||||
# do not run event loop if there's nothing to wait on.
|
||||
# this might happen if connect failed and connection was unregistered.
|
||||
return if (!r || r.empty?) && (!w || w.empty?)
|
||||
|
||||
break
|
||||
else
|
||||
@selectables = [*selectables, @selectables]
|
||||
|
Loading…
x
Reference in New Issue
Block a user