fix(core): update
This commit is contained in:
parent
3e0d01520e
commit
a69fee7985
@ -6,14 +6,17 @@ export class AgTestServer {
|
|||||||
|
|
||||||
constructor(handlerArg?: plugins.agSdk.AAgHandler<any>) {
|
constructor(handlerArg?: plugins.agSdk.AAgHandler<any>) {
|
||||||
if (handlerArg) {
|
if (handlerArg) {
|
||||||
this.handlers.push(handlerArg);
|
this.addAgHandler(handlerArg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async addAgHandler(handlerArg: plugins.agSdk.AAgHandler<any>) {
|
public async addAgHandler(handlerArg: plugins.agSdk.AAgHandler<any>) {
|
||||||
this.handlers.push(handlerArg);
|
this.handlers.push(handlerArg);
|
||||||
await this.stop();
|
console.log(`added handler with slug ${handlerArg.slug}`);
|
||||||
await this.start();
|
if (this.server && this.server.serverStatus === 'running') {
|
||||||
|
await this.stop();
|
||||||
|
await this.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async start() {
|
public async start() {
|
||||||
|
Loading…
Reference in New Issue
Block a user