Make a deep copy of our addresses for UPnP

Somehow "Expression: vector iterators incompatible" gets thrown especially on fresh start
TODO: figure out details
pull/406/head
Mikhail Titov 8 years ago
parent abdef67ccc
commit 8791f382b3

@ -19,6 +19,7 @@
#include "UPnP.h"
#include "NetDb.h"
#include "util.h"
#include "RouterInfo.h"
#include <miniupnpc/miniupnpc.h>
#include <miniupnpc/upnpcommands.h>
@ -100,7 +101,8 @@ namespace transport
void UPnP::Run ()
{
for (auto& address : context.GetRouterInfo ().GetAddresses ())
std::vector<data::RouterInfo::Address> a = context.GetRouterInfo().GetAddresses();
for (auto& address : a)
{
if (!address.host.is_v6 ())
{

Loading…
Cancel
Save