From a00f7f921c27b912f146d1a6513b794bd2fa693a Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Fri, 14 Jun 2019 11:40:54 +1000 Subject: [PATCH] Disable P2P server for now --- Signal/src/AppDelegate.m | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 18b32fb69..64bf93b71 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -318,28 +318,28 @@ static NSTimeInterval launchStartedAt; [OWSAnalytics appLaunchDidBegin]; // Loki - self.lokiP2PServer = [LKP2PServer new]; +// self.lokiP2PServer = [LKP2PServer new]; // We try to bind to 8081, if we can't then we just fallback to any random port - NSArray *ports = @[ @8081, @0 ]; - for (NSNumber *port in ports) { - if (self.lokiP2PServer.isRunning) { break; } - BOOL isStarted = [self.lokiP2PServer startOnPort:port.unsignedIntegerValue]; - if (isStarted) { - NSURL *serverURL = self.lokiP2PServer.serverURL; - [LKP2PAPI setOurP2PAddressWithUrl:self.lokiP2PServer.serverURL]; - NSString *serverURLDescription = serverURL.absoluteString; - if ([serverURLDescription hasSuffix:@"/"]) { - serverURLDescription = [serverURLDescription substringToIndex:serverURLDescription.length - 1]; - } - NSLog(@"[Loki] Started server at %@.", serverURLDescription); - break; - } - } +// NSArray *ports = @[ @8081, @0 ]; +// for (NSNumber *port in ports) { +// if (self.lokiP2PServer.isRunning) { break; } +// BOOL isStarted = [self.lokiP2PServer startOnPort:port.unsignedIntegerValue]; +// if (isStarted) { +// NSURL *serverURL = self.lokiP2PServer.serverURL; +// [LKP2PAPI setOurP2PAddressWithUrl:self.lokiP2PServer.serverURL]; +// NSString *serverURLDescription = serverURL.absoluteString; +// if ([serverURLDescription hasSuffix:@"/"]) { +// serverURLDescription = [serverURLDescription substringToIndex:serverURLDescription.length - 1]; +// } +// NSLog(@"[Loki] Started server at %@.", serverURLDescription); +// break; +// } +// } - if (!self.lokiP2PServer.isRunning) { - NSLog(@"[Loki] Failed to start P2P server."); - } +// if (!self.lokiP2PServer.isRunning) { +// NSLog(@"[Loki] Failed to start P2P server."); +// } return YES; }