Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

really shutdown test HTTPS server.

  • Loading branch information...
commit bb8050696c098485edaa1158839fc89d9f6da464 1 parent d348e20
@niklasb niklasb authored halogenandtoast committed
Showing with 5 additions and 4 deletions.
  1. +5 −4 spec/browser_spec.rb
View
9 spec/browser_spec.rb
@@ -40,13 +40,13 @@
before do
# set up minimal HTTPS server
@host = "127.0.0.1"
- serv = TCPServer.new(@host, 0)
- @port = serv.addr[1]
+ @server = TCPServer.new(@host, 0)
+ @port = @server.addr[1]
# set up SSL layer
- serv = OpenSSL::SSL::SSLServer.new(serv, $openssl_self_signed_ctx)
+ ssl_serv = OpenSSL::SSL::SSLServer.new(@server, $openssl_self_signed_ctx)
- @server_thread = Thread.new(serv) do |serv|
+ @server_thread = Thread.new(ssl_serv) do |serv|
while conn = serv.accept do
# read request
request = []
@@ -68,6 +68,7 @@
after do
@server_thread.kill
+ @server.shutdown
end
it "doesn't accept a self-signed certificate by default" do
Please sign in to comment.
Something went wrong with that request. Please try again.