Comparing version 3.0.0 to 3.0.1
3.0.1 / 2017-02-22 | ||
================== | ||
* fix: app.close in right order (#30) | ||
3.0.0 / 2017-02-13 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -119,11 +119,16 @@ 'use strict'; | ||
this.closed = true; | ||
const arr = []; | ||
if (this._agent) arr.push(this._agent.close()); | ||
if (this._app) arr.push(this._app.close()); | ||
let p = Promise.all(arr); | ||
/* istanbul ignore if */ | ||
if (os.platform() === 'win32') { | ||
p = p.then(() => sleep(1000)); | ||
} | ||
return p; | ||
const self = this; | ||
return co(function* () { | ||
if (self._app) { | ||
yield self._app.close(); | ||
} else { | ||
// when app init throws an exception, must wait for app quit gracefully | ||
yield sleep(200); | ||
} | ||
if (self._agent) yield self._agent.close(); | ||
/* istanbul ignore if */ | ||
if (os.platform() === 'win32') yield sleep(1000); | ||
}); | ||
} | ||
@@ -130,0 +135,0 @@ |
{ | ||
"name": "egg-mock", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"eggPlugin": { | ||
@@ -5,0 +5,0 @@ "name": "egg-mock" |
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
36349
894