Skip to content

Commit

Permalink
Merge pull request #219 from sewerynplazuk/seweryn/fix-no-op-in-dtxip…
Browse files Browse the repository at this point in the history
…cconnection-when-assertions-are-off

Fix NOOP code in DTXIPCConnection when assertions are turned off.
  • Loading branch information
tcamin authored Nov 18, 2024
2 parents 5c63045 + 2c0942b commit bca57e5
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 bca57e5

Please sign in to comment.