diff --git a/ChangeLog b/ChangeLog index 3170b81e4..97861b9e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -92,6 +92,7 @@ incoming connection * added more detailed instrumentation of the disk I/O thread + * fix UPnP issue for routers with multiple PPPoE connections * fix issue where event=stopped announces wouldn't be sent when closing session * fix possible hang in file::readv() on windows * fix CPU busy loop issue in tracker announce logic diff --git a/src/upnp.cpp b/src/upnp.cpp index 2afac35e3..cae0cb371 100644 --- a/src/upnp.cpp +++ b/src/upnp.cpp @@ -820,8 +820,9 @@ TORRENT_EXPORT void find_control_url(int type, char const* string, parse_state& if (string_equal_no_case(string, state.service_type)) state.in_service = true; } - else if (state.in_service && state.top_tags("service", "controlurl")) + else if (state.control_url.empty() && state.in_service && state.top_tags("service", "controlurl")) { + // default to the first (or only) control url in the router's listing state.control_url = string; } else if (state.model.empty() && state.top_tags("device", "modelname"))