mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-12-10 00:03:00 -05:00
Remove response body finalizer
it's unnecessary, see discussion in https://gitlab.com/honeyryderchuck/httpx/-/merge_requests/159
This commit is contained in:
parent
f18da78832
commit
aa3be21c89
@ -118,16 +118,6 @@ module HTTPX
|
|||||||
@length = 0
|
@length = 0
|
||||||
@buffer = nil
|
@buffer = nil
|
||||||
@state = :idle
|
@state = :idle
|
||||||
ObjectSpace.define_finalizer(self, self.class.finalize(@buffer))
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.finalize(buffer)
|
|
||||||
proc {
|
|
||||||
return unless buffer
|
|
||||||
|
|
||||||
@buffer.close
|
|
||||||
@buffer.unlink if @buffer.respond_to?(:unlink)
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def closed?
|
def closed?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user