From 8791f382b399f9727dfc8b3854a26ce29ee4c187 Mon Sep 17 00:00:00 2001 From: Mikhail Titov Date: Wed, 9 Mar 2016 00:42:58 -0600 Subject: [PATCH] Make a deep copy of our addresses for UPnP Somehow "Expression: vector iterators incompatible" gets thrown especially on fresh start TODO: figure out details --- UPnP.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ()) {