Skip to content

Commit

Permalink
Rescue Errno::EBADF in Client#close (puma#2748)
Browse files Browse the repository at this point in the history
Spotted happening in CI: https://github.com/puma/puma/runs/4095295281?check_suite_focus=true

    2021-11-03 16:34:54 +0000 Exception handling servers: #<Errno::EBADF: Bad file descriptor>/Users/runner/work/puma/puma/lib/puma/client.rb:163:in `close': Bad file descriptor (Errno::EBADF)
    TestRackServer#test_large_post_body =
            from /Users/runner/work/puma/puma/lib/puma/client.rb:163:in `close'
  • Loading branch information
dentarg authored and JuanitoFatas committed Sep 9, 2022
1 parent d3ae8f3 commit a0f8688
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puma/client.rb
Expand Up @@ -161,7 +161,7 @@ def reset(fast_check=true)
def close
begin
@io.close
rescue IOError
rescue IOError, Errno::EBADF
Puma::Util.purge_interrupt_queue
end
end
Expand Down

0 comments on commit a0f8688

Please sign in to comment.