Skip to content

Commit

Permalink
Fix noop code in DTXIPCConnection when assertions are turned off. (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
sewerynplazuk authored Nov 18, 2024
1 parent 6be6c4f commit e87d529
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/SBTUITestTunnelCommon/DetoxIPC/DTXIPCConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ - (instancetype)initWithServiceName:(NSString *)serviceName
_slave = YES;

//Attempt becoming the slave
NSAssert([self _commonInit] == YES, @"The service “%@” already has two endpoints connected.", _serviceName);
BOOL initResult = [self _commonInit];
NSAssert(initResult == YES, @"The service “%@” already has two endpoints connected.", _serviceName);

_otherConnection = [NSConnection connectionWithRegisteredName:_serviceName host:nil];
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(_otherConnectionDidDie:) name:NSConnectionDidDieNotification object:_otherConnection];
Expand Down

0 comments on commit e87d529

Please sign in to comment.