Skip to content

Commit

Permalink
Merge pull request #96 from jyoung-man/master
Browse files Browse the repository at this point in the history
change async gcd to sync
  • Loading branch information
dung2le authored Sep 30, 2024
2 parents 590f97a + 9a040c6 commit 4bb1f11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Discovery/Providers/SSDPDiscoveryProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ - (void) sendRequestForFilter:(NSString *)filter userAgentToken:(NSString *)user
NSData *message = CFBridgingRelease(CFHTTPMessageCopySerializedMessage(theSearchRequest));

__weak typeof(self) weakSelf = self;
dispatch_async(self.socketQueue, ^{
dispatch_sync(self.socketQueue, ^{
__strong typeof(weakSelf) strongSelf = weakSelf;
if (!_searchSocket) {
_searchSocket = [[SSDPSocketListener alloc] initWithAddress:kSSDP_multicast_address andPort:0];
Expand All @@ -236,7 +236,7 @@ - (void) sendRequestForFilter:(NSString *)filter userAgentToken:(NSString *)user
}
});

dispatch_async(self.socketQueue, ^{
dispatch_sync(self.socketQueue, ^{
__strong typeof(weakSelf) strongSelf = weakSelf;
if (!_multicastSocket) {
_multicastSocket = [[SSDPSocketListener alloc] initWithAddress:kSSDP_multicast_address andPort:kSSDP_port];
Expand Down

0 comments on commit 4bb1f11

Please sign in to comment.