[remoting] Too many NetworkManager instances |
|
Issue descriptionA new NetworkManager instance is created per connection channel (so, for the Pepper/NaCl client, there is one instance for "mux" channel and one for "video" channel. Since the NetworkManager is responsible for enumerating local network interfaces (and signaling changes to it), there should only be one singleton instance. Right now, we create a new instance in ChromiumPortAllocatorFactory: https://cs.chromium.org/chromium/src/remoting/protocol/chromium_port_allocator_factory.cc?l=22&rcl=6be8acd7b09a2378d8c47ca9fa91b9fd9b4839ba And in PepperPortAllocatorFactory: https://cs.chromium.org/chromium/src/remoting/client/plugin/pepper_port_allocator_factory.cc?l=25&rcl=a45859e2bafed9e482e61aceb2ab0cb7efee4ab5 We probably want to keep one PortAllocator per channel, but they should share the same NetworkManager instance. Note that the NetworkManager fires a WebRTC signal when the network list is changed. But that signal is only a change-notification; there is no way for any signal receiver to know which NetworkManager instance holds the new list - which is another reason it's important for it to be a singleton. |
|
►
Sign in to add a comment |
|
Comment 1 by lambroslambrou@chromium.org
, Jun 6 2018