Skip to content

Commit

Permalink
To avoid fd leak with fetch request for SSL server
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jul 17, 2024
1 parent 659eb3a commit 4db7011
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/net/http/test_https.rb
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ def test_identity_verify_failure
@log_tester = lambda {|_| }
ex = assert_raise(OpenSSL::SSL::SSLError){
http.request_get("/") {|res| }
sleep 0.5
}
re_msg = /certificate verify failed|hostname \"#{HOST_IP}\" does not match/
assert_match(re_msg, ex.message)
Expand Down
1 change: 1 addition & 0 deletions test/net/http/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def setup
end

def teardown
sleep 0.5 if @config['ssl_enable']
if @server
@server.shutdown
end
Expand Down

0 comments on commit 4db7011

Please sign in to comment.