diff --git a/test/tool/lib/webrick/server.rb b/test/tool/lib/webrick/server.rb index fd6b7a61b56..ef4839537f2 100644 --- a/test/tool/lib/webrick/server.rb +++ b/test/tool/lib/webrick/server.rb @@ -350,7 +350,7 @@ def alarm_shutdown_pipe if !pipe.closed? begin yield pipe - rescue IOError # closed by another thread. + rescue IOError, Errno::EBADF, Errno::EPIPE # closed by another thread. end end end