summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2014-09-03 17:40:55 -0700
committerJohn Keiser <jkeiser@opscode.com>2014-09-03 17:40:55 -0700
commite6bb0294ce788912d6ee885685aaf8113beaa25f (patch)
tree5b5f525be582c0829cc22094d3a803e12c63894f
parent3d2c4b754a2f3c4bc00df013766bcccab6a91762 (diff)
downloadchef-zero-e6bb0294ce788912d6ee885685aaf8113beaa25f.tar.gz
Handle exceptional conditions where stops are being called all over
-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