core: fix calling close() on null in hub.js

This commit is contained in:
Micooz 2017-08-28 22:40:30 +08:00
parent b6cf12315e
commit 5f85be4b75

@ -53,6 +53,9 @@ export class Hub extends EventEmitter {
}
terminate() {
if (this._localServer === null) {
return;
}
this._localServer.close();
this._localServer = null;
this._isFirstWorker && logger.info('==> [hub] shutdown');