1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

local_address may raise IOError in debug print

https://rubyci.org/logs/rubyci.s3.amazonaws.com/wsl2/ruby-master/log/20200605T020004Z.fail.html.gz
```
[  984/20282] IMAPTest#test_connection_closed_without_greeting#<Thread:0x000055b6e9589d28 /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:133 run> terminated with exception (report_on_exception is true):
/home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/.ext/common/socket.rb:252:in `local_address': closed stream (IOError)
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/.ext/common/socket.rb:252:in `connect_address'
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `block (2 levels) in test_connection_closed_without_greeting'
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `each_object'
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `each'
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `map'
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:514:in `block in test_connection_closed_without_greeting'
	from /home/mame/chkbuild/tmp/build/20200605T020004Z/ruby/test/net/imap/test_imap.rb:134:in `block in start_server'
```
This commit is contained in:
Kazuhiro NISHIYAMA 2020-06-05 11:45:30 +09:00
parent e17028e48b
commit efa8df2886
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

View file

@ -511,7 +511,7 @@ class IMAPTest < Test::Unit::TestCase
sock_addr: sock.addr,
sock_peeraddr: sock.peeraddr,
t: Process.clock_gettime(Process::CLOCK_MONOTONIC),
sockets: ObjectSpace.each_object(BasicSocket).map{|s| [s.inspect, connect_address: s.connect_address.inspect, local_address: s.local_address.inspect, remote_address: (s.remote_address rescue nil).inspect] },
sockets: ObjectSpace.each_object(BasicSocket).map{|s| [s.inspect, connect_address: (s.connect_address rescue nil).inspect, local_address: (s.local_address rescue nil).inspect, remote_address: (s.remote_address rescue nil).inspect] },
}
sock.close
h[:in_start_server_sock_closed] = {