diff --git a/BeeHive/BHWatchDog.m b/BeeHive/BHWatchDog.m index 104875d..3be95ad 100644 --- a/BeeHive/BHWatchDog.m +++ b/BeeHive/BHWatchDog.m @@ -85,7 +85,7 @@ - (instancetype)initWithThreshold:(double)threshold strictMode:(BOOL)strictMode - (instancetype)initWIthThreshold:(double)threshold callBack:(watchdogFiredCallBack)callBack { - if ([self init]) { + if (self = [self init]) { self.threshold = 0.4;//默认间隔 self.threshold = threshold; self.pingThread = [[PingThread alloc] initWithThreshold:threshold handler:callBack];