Fix double shutdown

This commit is contained in:
Lauren Budorick 2016-03-30 18:20:37 -07:00 committed by Patrick Niklaus
parent a4d6544764
commit 5647e6c199

View File

@ -38,7 +38,7 @@ var OSRMBaseLoader = class {
}
osrmDown (callback) {
if (this.scope.pid) {
if (this.scope.pid && this.child && !this.child.exitCode) {
process.kill(this.scope.pid, this.scope.TERMSIGNAL);
this.waitForShutdown(callback);
this.scope.pid = null;