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>) {
|
||||
if (handlerArg) {
|
||||
this.handlers.push(handlerArg);
|
||||
this.addAgHandler(handlerArg);
|
||||
}
|
||||
}
|
||||
|
||||
public async addAgHandler(handlerArg: plugins.agSdk.AAgHandler<any>) {
|
||||
this.handlers.push(handlerArg);
|
||||
await this.stop();
|
||||
await this.start();
|
||||
console.log(`added handler with slug ${handlerArg.slug}`);
|
||||
if (this.server && this.server.serverStatus === 'running') {
|
||||
await this.stop();
|
||||
await this.start();
|
||||
}
|
||||
}
|
||||
|
||||
public async start() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user