@ -254,7 +254,7 @@ static __weak PEPSync *s_pEpSync;
self.conditionLockForJoiningSyncThread = nil;
if (!isFromShutdown) {
// Only inform the delegate if the shutdown came from the engine
[self.notifyHandshakeDelegate keySyncDisabled];
[self.notifyHandshakeDelegate engineShutdownKeySync];
}
@ -38,7 +38,8 @@
partner:(PEPIdentity * _Nonnull)partner
signal:(PEPSyncHandshakeSignal)signal;
/// Sent when the sync loop was shut down
- (void)keySyncDisabled;
/// Sent when the sync loop was shut down by the engine,
/// e.g. in response to leving the device group
- (void)engineShutdownKeySync;
@end
@ -1317,7 +1317,7 @@
XCTAssertNil(error);
// leaving a device group should disable sync
XCTAssertTrue(self.notifyHandshakeDelegate.engineDisabledKeySync);
XCTAssertTrue(self.notifyHandshakeDelegate.engineDidShutdownKeySync);
[self shutdownSync];
@ -13,6 +13,6 @@
@interface PEPSessionTestNotifyHandshakeDelegate : NSObject<PEPNotifyHandshakeDelegate>
/// This is set to YES if the _engine_ shut the sync loop down.
@property (nonatomic) BOOL engineDisabledKeySync;
@property (nonatomic) BOOL engineDidShutdownKeySync;
@ -18,9 +18,9 @@
return PEPStatusOK;
- (void)keySyncDisabled
- (void)engineShutdownKeySync
{
self.engineDisabledKeySync = YES;
self.engineDidShutdownKeySync = YES;