Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

close socket after test

  • Loading branch information...
commit e442150a6a0f18146459bbce92b98d3fb6a4a328 1 parent 25281b7
@niklasb niklasb authored halogenandtoast committed
Showing with 4 additions and 3 deletions.
  1. +4 −3 spec/browser_spec.rb
View
7 spec/browser_spec.rb
@@ -97,11 +97,11 @@
@pass = 'secret'
@url = "http://example.org/"
- serv = TCPServer.new(@host, 0)
- @port = serv.addr[1]
+ @server = TCPServer.new(@host, 0)
+ @port = @server.addr[1]
@proxy_requests = []
- @proxy = Thread.new(serv, @proxy_requests) do |serv, proxy_requests|
+ @proxy = Thread.new(@server, @proxy_requests) do |serv, proxy_requests|
while conn = serv.accept do
# read request
request = []
@@ -141,6 +141,7 @@
after do
@proxy.kill
+ @server.shutdown
end
it 'uses the HTTP proxy correctly' do
Please sign in to comment.
Something went wrong with that request. Please try again.