From 3915aa436120ed296eef08925005e56d942d8025 Mon Sep 17 00:00:00 2001 From: Gerasimos Maropoulos Date: Fri, 16 Sep 2016 10:25:56 +0300 Subject: [PATCH] cover the default station's upate( https://github.com/kataras/iris/issues/401 ) action --- iris.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/iris.go b/iris.go index edeec268..0ceda4cc 100644 --- a/iris.go +++ b/iris.go @@ -260,7 +260,11 @@ func (s *Framework) Set(setters ...OptionSetter) { // because of the reason that an update can be executed while Iris is running, // this is the only configuration field which is re-checked at runtime for that type of action. - // + // exists on initialize() also in order to cover the usage of: iris.Config.CheckForUpdates = true + s.checkForUpdates() +} + +func (s *Framework) checkForUpdates() { // note: we could use the IsDevelopment configuration field to do that BUT // the developer may want to check for updates without, for example, re-build template files (comes from IsDevelopment) on each request if s.Config.CheckForUpdates { @@ -350,6 +354,9 @@ func (s *Framework) initialize() { if s.SSH != nil && s.SSH.Enabled() { s.SSH.bindTo(s) } + + // updates, to cover the default station's irs.Config.checkForUpdates + s.checkForUpdates() } // Go starts the iris station, listens to all registered servers, and prepare only if Virtual