summaryrefslogtreecommitdiff
path: root/test/resolv
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2024-08-22 09:39:09 +0900
committerHiroshi SHIBATA <[email protected]>2024-08-22 10:38:43 +0900
commit8558bea27bdbb68b51d4e67a37e3db95e17fdd73 (patch)
treea2db1096d46e2214e32a159c0e96a988360552b4 /test/resolv
parent773cf883ac75f0f207f8e468461d19f008dba118 (diff)
Suppress warning for fd leak
``` Leaked file descriptor: TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback: 15 : #<TCPSocket:fd 15, AF_INET, 127.0.0.1, 61633> ```
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11428
Diffstat (limited to 'test/resolv')
-rw-r--r--test/resolv/test_dns.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb
index 133dbab6cf..f9224fbebe 100644
--- a/test/resolv/test_dns.rb
+++ b/test/resolv/test_dns.rb
@@ -758,7 +758,7 @@ class TestResolvDNS < Test::Unit::TestCase
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