--- a/subversion/bindings/swig/ruby/test/util.rb
+++ b/subversion/bindings/swig/ruby/test/util.rb
@@ -371,6 +371,8 @@
 	TCPSocket.new(@svnserve_host, port).close
       rescue Errno::ECONNREFUSED
 	sleep(n < 10 ? 0.2 : 0.5)
+      rescue Errno::EINVAL
+	sleep(n < 10 ? 0.2 : 0.5)
       else
 	return true
       end
