aboutsummaryrefslogtreecommitdiffstats
path: root/test/net
diff options
context:
space:
mode:
Diffstat (limited to 'test/net')
-rw-r--r--test/net/http/utils.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/net/http/utils.rb b/test/net/http/utils.rb
index 32cea2a78c..227c39fc9b 100644
--- a/test/net/http/utils.rb
+++ b/test/net/http/utils.rb
@@ -31,9 +31,11 @@ module TestNetHTTPUtils
end
def teardown
- @server.shutdown
- until @server.status == :Stop
- sleep 0.1
+ if @server
+ @server.shutdown
+ until @server.status == :Stop
+ sleep 0.1
+ end
end
# resume global state
Net::HTTP.version_1_2