summaryrefslogtreecommitdiff
path: root/lib/chef_zero/server.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2016-09-22 14:35:35 -0700
committerTim Smith <tsmith@chef.io>2016-09-22 14:35:35 -0700
commit2592e05d971245102eda5a9912dd3270410fab48 (patch)
treea1d1d5d5431d832b2d4b463badce84e13cf17119 /lib/chef_zero/server.rb
parent841fe80d15a957100a23b2f41baa4a63c5bcedc0 (diff)
downloadchef-zero-2592e05d971245102eda5a9912dd3270410fab48.tar.gz
Fix a few chefstyle warningscontrib
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef_zero/server.rb')
-rw-r--r--lib/chef_zero/server.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/chef_zero/server.rb b/lib/chef_zero/server.rb
index dd83fe3..43b42f8 100644
--- a/lib/chef_zero/server.rb
+++ b/lib/chef_zero/server.rb
@@ -287,9 +287,9 @@ module ChefZero
:SSLEnable => options[:ssl],
:SSLOptions => ssl_opts,
:SSLCertName => [ [ "CN", WEBrick::Utils.getservername ] ],
- :StartCallback => proc {
+ :StartCallback => proc do
@running = true
- }
+ end
)
ENV["HTTPS"] = "on" if options[:ssl]
@server.mount("/", Rack::Handler::WEBrick, app)
@@ -320,9 +320,7 @@ module ChefZero
end
# Do not return until the web server is genuinely started.
- while !@running && @thread.alive?
- sleep(0.01)
- end
+ sleep(0.01) while !@running && @thread.alive?
SocketlessServerMap.instance.register_port(@port, self)