File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -99,9 +99,8 @@ local function make_iterator(self, perform)
9999
100100 if n <= remain then
101101 while true do
102- local h , ok , err = assert (self :info_read ())
103- if h == 0 then break end
104- local e = assert (self ._easy [h ])
102+ local e , ok , err = assert (self :info_read ())
103+ if e == 0 then break end
105104 if ok then
106105 ok = e :getinfo_response_code () or ok
107106 buffers :append (e , " done" , ok )
@@ -423,6 +422,22 @@ function Multi:remove_handle(e)
423422 return remove_handle (self , h )
424423end
425424
425+ function Multi :info_read (...)
426+ while true do
427+ local h , ok , err = self :handle ():info_read (... )
428+ if not h then return nil , ok end
429+ if h == 0 then return h end
430+
431+ local e = self ._easy [h ]
432+ if e then
433+ if ... then
434+ self ._easy [h ], self ._easy .n = nil , self ._easy .n - 1
435+ end
436+ return e , ok , err
437+ end
438+ end
439+ end
440+
426441end
427442---- ---------------------------------------
428443
You can’t perform that action at this time.
0 commit comments