summaryrefslogtreecommitdiff
path: root/lib/chef_zero/server.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef_zero/server.rb')
-rw-r--r--lib/chef_zero/server.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef_zero/server.rb b/lib/chef_zero/server.rb
index 16c6fc8..dc6e6a3 100644
--- a/lib/chef_zero/server.rb
+++ b/lib/chef_zero/server.rb
@@ -300,8 +300,8 @@ module ChefZero
#
def stop(wait = 5)
if @running
- @server.shutdown
- @thread.join(wait)
+ @server.shutdown if @server
+ @thread.join(wait) if @thread
end
rescue Timeout::Error
if @thread