Skip to content

Commit bb470d8

Browse files
committed
feat: prevent csv raw response from auto-closing during sync
1 parent 3e1a5fb commit bb470d8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

airbyte_cdk/sources/declarative/decoders/composite_raw_decoder.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ def decode(
152152
self, response: requests.Response
153153
) -> Generator[MutableMapping[str, Any], None, None]:
154154
if self.is_stream_response():
155+
response.raw.auto_close = False
155156
yield from self.parser.parse(data=response.raw) # type: ignore[arg-type]
157+
response.raw.close()
156158
else:
157159
yield from self.parser.parse(data=io.BytesIO(response.content))

0 commit comments

Comments
 (0)