From 3fce1db2eb76c0496e73080dc77763ce349aadc2 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Thu, 16 Jan 2020 23:44:54 +0800 Subject: [PATCH] Migrate away from deprecated settings Libtorrent has deprecated `upnp_ignore_nonrouters` in https://github.com/arvidn/libtorrent/pull/4251 --- src/base/bittorrent/session.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index fab36fe9a..ae509b9c9 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -1088,7 +1088,9 @@ void Session::initializeNativeSession() // turn them off before `lt::session` ctor to avoid split second effects pack.set_bool(lt::settings_pack::enable_upnp, false); pack.set_bool(lt::settings_pack::enable_natpmp, false); +#if (LIBTORRENT_VERSION_NUM < 10204) pack.set_bool(lt::settings_pack::upnp_ignore_nonrouters, true); +#endif #if (LIBTORRENT_VERSION_NUM < 10200) // Disable support for SSL torrents for now