Skip to content

Conversation

@ioquatix
Copy link
Member

@ioquatix ioquatix commented Feb 7, 2024

Required to fix socketry/async-http-faraday#32.

Faraday's implementation of #close expects CompositeReadIO to implement close:

 0.84s     warn: Async::Task: Writing #<Async::HTTP::Faraday::BodyWrapper:0x0000000128e1ca48> to #<Async::HTTP::Protocol::HTTP2::Response::Stream:0x0000000128a60f08>. [oid=0x2bc] [ec=0x2d0] [pid=37892] [2024-02-07 22:55:46 +1300]
               | Task may have ended with unhandled exception.
               |   NoMethodError: undefined method `close' for an instance of Multipart::Post::CompositeReadIO
               |   → /Users/samuel/.gem/ruby/3.3.0/gems/faraday-multipart-1.0.4/lib/faraday/multipart/file_part.rb:112 in `each'
               |     /Users/samuel/.gem/ruby/3.3.0/gems/faraday-multipart-1.0.4/lib/faraday/multipart/file_part.rb:112 in `close'
               |     lib/async/http/faraday/adapter.rb:30 in `close'

Types of Changes

  • Bug fix.
  • New feature.

Contribution

@ioquatix ioquatix merged commit 751ad80 into main Feb 7, 2024
@ioquatix ioquatix deleted the composite-read-io-close branch February 7, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multipart post causes error in protocol-http

2 participants