mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Try increasing SMTP's read_timeout for --jit-wait
for random hangs like: http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3302796 http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3302188 http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3301293
This commit is contained in:
parent
8e231ffa8c
commit
15c129d087
1 changed files with 11 additions and 0 deletions
|
@ -29,6 +29,17 @@ module Net
|
|||
end
|
||||
|
||||
def setup
|
||||
# Avoid hanging at fake_server_start's IO.select on --jit-wait CI like http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3302796
|
||||
# Unfortunately there's no way to configure read_timeout for Net::SMTP.start.
|
||||
if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
|
||||
Net::SMTP.prepend Module.new {
|
||||
def initialize(*)
|
||||
super
|
||||
@read_timeout *= 5
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
@server_threads = []
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue