Disable iOS portforwarder

Summary:
Disabling the port fordwarder.
On physical devices, when flipper isn't running and they don't have any certificates, they attempt to connect to the desktop.
They always connect to the portforwarder, even though it doesn't connect to flipper desktop.
After connecting to the portforwarder, they then try to generate the SSL certs. This is a CPU intensive operation and happens repeatedly in this condition when it really shouldn't be, causing high cpu usage.

Disabling for now. The fix will be to make sure that they only do that generation when they are fully connected.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13507353

fbshipit-source-id: a858a5da7352228b063150334ea443130763d888
This commit is contained in:
John Knox
2018-12-18 12:20:50 -08:00
committed by Facebook Github Bot
parent 1fc73ad2fb
commit 73e921bafc

View File

@@ -28,8 +28,8 @@ using WrapperPlugin = facebook::flipper::FlipperCppWrapperPlugin;
folly::ScopedEventBaseThread sonarThread;
folly::ScopedEventBaseThread connectionThread;
#if !TARGET_OS_SIMULATOR
FKPortForwardingServer *_secureServer;
FKPortForwardingServer *_insecureServer;
// FKPortForwardingServer *_secureServer;
// FKPortForwardingServer *_insecureServer;
#endif
}
@@ -120,12 +120,12 @@ using WrapperPlugin = facebook::flipper::FlipperCppWrapperPlugin;
- (void)start;
{
#if !TARGET_OS_SIMULATOR
_secureServer = [FKPortForwardingServer new];
[_secureServer forwardConnectionsFromPort:8088];
[_secureServer listenForMultiplexingChannelOnPort:8078];
_insecureServer = [FKPortForwardingServer new];
[_insecureServer forwardConnectionsFromPort:8089];
[_insecureServer listenForMultiplexingChannelOnPort:8079];
// _secureServer = [FKPortForwardingServer new];
// [_secureServer forwardConnectionsFromPort:8088];
// [_secureServer listenForMultiplexingChannelOnPort:8078];
// _insecureServer = [FKPortForwardingServer new];
// [_insecureServer forwardConnectionsFromPort:8089];
// [_insecureServer listenForMultiplexingChannelOnPort:8079];
#endif
_cppClient->start();
}
@@ -135,10 +135,10 @@ using WrapperPlugin = facebook::flipper::FlipperCppWrapperPlugin;
{
_cppClient->stop();
#if !TARGET_OS_SIMULATOR
[_secureServer close];
_secureServer = nil;
[_insecureServer close];
_insecureServer = nil;
// [_secureServer close];
// _secureServer = nil;
// [_insecureServer close];
// _insecureServer = nil;
#endif
}