From 3d4382143a9295dacab8551f971b5f47e1896bfc Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 22 Aug 2024 09:39:09 +0900 Subject: [PATCH] Surpress warning for fd leak ``` Leaked file descriptor: TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback: 15 : # ``` --- test/resolv/test_dns.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb index 133dbab6cf8ad6..f9224fbebe9fa4 100644 --- a/test/resolv/test_dns.rb +++ b/test/resolv/test_dns.rb @@ -758,7 +758,7 @@ def test_multiple_servers_with_timeout_and_truncated_tcp_fallback u1.send(msg[0...512], 0, client_address, client_port) end - tcp_server1_thread = Thread.new { t1.accept } + tcp_server1_thread = Thread.new { t1.accept; t1.close } tcp_server2_thread = Thread.new do ct = t2.accept