diff options
author | NAKAMURA Usaku <usa@ruby-lang.org> | 2021-12-31 19:48:36 +0900 |
---|---|---|
committer | NAKAMURA Usaku <usa@ruby-lang.org> | 2021-12-31 19:48:36 +0900 |
commit | 1034b6e7ba9442320e16c260d634d4c64d5e62bf (patch) | |
tree | cf3802489d490120a95f8199c23f29fe936afcd5 /ext | |
parent | 1cc5567b46249e6b4bd2dd3cfdd348ab885f59e3 (diff) |
merge revision(s) 0c5f8c62766afe4605172800063e63fe36996658: [Backport #10961]
[ruby/zlib] Resume zstream if available [Bug #10961]
---
ext/zlib/zlib.c | 6 ++++++
1 file changed, 6 insertions(+)
Diffstat (limited to 'ext')
-rw-r--r-- | ext/zlib/zlib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 5c8aab24af..3b8e097da9 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1066,6 +1066,12 @@ loop: RB_NOGVL_UBF_ASYNC_SAFE); #endif + /* retry if no exception is thrown */ + if (err == Z_OK && args.interrupt) { + args.interrupt = 0; + goto loop; + } + if (flush != Z_FINISH && err == Z_BUF_ERROR && z->stream.avail_out > 0) { z->flags |= ZSTREAM_FLAG_IN_STREAM; |