diff options
author | wanabe <s.wanabe@gmail.com> | 2021-03-07 21:22:47 +0900 |
---|---|---|
committer | wanabe <s.wanabe@gmail.com> | 2021-03-09 13:19:03 +0900 |
commit | 0c5f8c62766afe4605172800063e63fe36996658 (patch) | |
tree | d6e0fb9916564edc7f5d3dc51c51306e5edd193e /ext | |
parent | e85bffc32473968b2e3736ad712f5e0d6e9aebc9 (diff) | |
download | ruby-0c5f8c62766afe4605172800063e63fe36996658.tar.gz |
[ruby/zlib] Resume zstream if available [Bug #10961]
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 90fa5a61ef..1db5bdb4d9 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1095,6 +1095,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; |