androidwebrtcwebrtc-android

android webrtc intent leak


I'm trying to create a webrtc app. the connection happens on a foreground service and we cleanup (destroy) the connection in OnDestory state of the service. however I get this error after the CallService is destroyed:

CallService has leaked IntentReceiver org.webrtc.NetworkMonitorAutoDetect@bcf6651 that was originally registered here.

we don't have direct control over this receiver to unregister it and I'm closing the peerConnectionFactory.

What am I missing here?


Solution

  • While not the perfect solution, the workaround to this problem is to disable the network monitoring via the peerConnectionFactory options parameters like this:

    options.disableNetworkMonitor = true