From 081e255c99eaf90ea0858089b8453163229f5891 Mon Sep 17 00:00:00 2001 From: Huan LI Date: Fri, 13 Jul 2018 04:49:44 +0800 Subject: [PATCH] add unref() https://github.com/Chatie/wechaty/issues/1197 --- src/puppet-mock.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/puppet-mock.ts b/src/puppet-mock.ts index d2494ae..e46039f 100644 --- a/src/puppet-mock.ts +++ b/src/puppet-mock.ts @@ -436,6 +436,13 @@ export class PuppetMock extends Puppet { return } + public unref (): void { + log.verbose('PuppetMock', 'unref()') + super.unref() + if (this.loopTimer) { + this.loopTimer.unref() + } + } } export default PuppetMock