Skip to content
Snippets Groups Projects
Commit 55c2e4f8 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

ios: disable upnp port re-mapping on connectivityChanged

- ios invalidates udp sockets when entering the background, thus
  calls to connectivity changed after returning to the foreground
  will trigger a broken pipe signal
- this patch disables port re-mapping until libupnp is patched

Change-Id: I00e1bb93a83560af8f5505bed83f0aa63ab0a731
parent 26cbf5d8
Branches
No related tags found
No related merge requests found
......@@ -42,6 +42,10 @@
#include "client/ring_signal.h"
#include "upnp/upnp_context.h"
#ifdef __APPLE__
#include <TargetConditionals.h>
#endif
#ifdef RING_UWP
#include "windirent.h"
#else
......@@ -865,11 +869,13 @@ connectivityChanged()
RING_WARN("received connectivity changed - trying to re-connect enabled accounts");
// reset the UPnP context
#if !(defined(TARGET_OS_IOS) && TARGET_OS_IOS)
try {
ring::upnp::getUPnPContext()->connectivityChanged();
} catch (std::runtime_error& e) {
RING_ERR("UPnP context error: %s", e.what());
}
#endif
for (const auto &account : ring::Manager::instance().getAllAccounts()) {
account->connectivityChanged();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment