Comparing version 17.2.3 to 17.3.0
@@ -66,2 +66,3 @@ 'use strict'; | ||
this.compression = new Compression(); | ||
this.controlled = null; // Other servers linked to the phases of this server | ||
this.decorations = { handler: [], request: [], server: [], toolkit: [] }; // Public decoration names | ||
@@ -255,2 +256,6 @@ this.dependencies = []; // Plugin dependencies | ||
try { | ||
if (this.controlled) { | ||
await Promise.all(this.controlled.map((control) => control.start())); | ||
} | ||
await this._invoke('onPostStart'); | ||
@@ -324,2 +329,6 @@ } | ||
this.phase = 'initialized'; | ||
if (this.controlled) { | ||
await Promise.all(this.controlled.map((control) => control.initialize())); | ||
} | ||
} | ||
@@ -371,2 +380,7 @@ catch (err) { | ||
this.heavy.stop(); | ||
if (this.controlled) { | ||
await Promise.all(this.controlled.map((control) => control.stop(options))); | ||
} | ||
await this._invoke('onPostStop'); | ||
@@ -373,0 +387,0 @@ this.phase = 'stopped'; |
@@ -102,2 +102,10 @@ 'use strict'; | ||
control(server) { | ||
Hoek.assert(server instanceof internals.Server, 'Can only control Server objects'); | ||
this._core.controlled = this._core.controlled || []; | ||
this._core.controlled.push(server); | ||
} | ||
decoder(encoding, decoder) { | ||
@@ -104,0 +112,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"homepage": "http://hapijs.com", | ||
"version": "17.2.3", | ||
"version": "17.3.0", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -13,3 +13,3 @@ <img src="https://raw.github.com/hapijs/hapi/master/images/17.png" align="right"/> | ||
Development version: **17.1.x** ([release notes](https://github.com/hapijs/hapi/issues?labels=release+notes&page=1&state=closed)) | ||
Development version: **17.3.x** ([release notes](https://github.com/hapijs/hapi/issues?labels=release+notes&page=1&state=closed)) | ||
[![Build Status](https://secure.travis-ci.org/hapijs/hapi.svg?branch=master)](http://travis-ci.org/hapijs/hapi) | ||
@@ -16,0 +16,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
168533
4195