diff --git a/UPnP.cpp b/UPnP.cpp index f2dddae1..0466d9e7 100644 --- a/UPnP.cpp +++ b/UPnP.cpp @@ -19,6 +19,7 @@ #include "UPnP.h" #include "NetDb.h" #include "util.h" +#include "RouterInfo.h" #include #include @@ -100,7 +101,8 @@ namespace transport void UPnP::Run () { - for (auto& address : context.GetRouterInfo ().GetAddresses ()) + std::vector a = context.GetRouterInfo().GetAddresses(); + for (auto& address : a) { if (!address.host.is_v6 ()) {