mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-09-01 00:00:35 -04:00
passing EOF errors when IO is closed (which will be ignored if all requests have been served)
This commit is contained in:
parent
0284b0478e
commit
aee3a6c5b1
@ -154,7 +154,9 @@ module HTTPX
|
||||
loop do
|
||||
siz = @io.read(wsize, @read_buffer)
|
||||
unless siz
|
||||
emit(:close)
|
||||
ex = EOFError.new("descriptor closed")
|
||||
ex.set_backtrace(caller)
|
||||
on_error(ex)
|
||||
return
|
||||
end
|
||||
return if siz.zero?
|
||||
@ -168,7 +170,9 @@ module HTTPX
|
||||
return if @write_buffer.empty?
|
||||
siz = @io.write(@write_buffer)
|
||||
unless siz
|
||||
emit(:close)
|
||||
ex = EOFError.new("descriptor closed")
|
||||
ex.set_backtrace(caller)
|
||||
on_error(ex)
|
||||
return
|
||||
end
|
||||
log { "WRITE: #{siz} bytes..." }
|
||||
|
Loading…
x
Reference in New Issue
Block a user