hack to fix an issue in natpmp and upnp
This commit is contained in:
parent
8be38c41d7
commit
9c3076481d
|
@ -73,6 +73,10 @@ natpmp::natpmp(io_service& ios, address const& listen_interface
|
|||
, m_disabled(false)
|
||||
, m_abort(false)
|
||||
{
|
||||
// unfortunately async operations rely on the storage
|
||||
// for this array not to be reallocated, by passing
|
||||
// around pointers to its elements. so reserve size for now
|
||||
m_mappings.reserve(10);
|
||||
rebind(listen_interface);
|
||||
}
|
||||
|
||||
|
|
|
@ -88,6 +88,8 @@ upnp::upnp(io_service& ios, connection_queue& cc
|
|||
m_mappings.swap(s->mappings);
|
||||
delete s;
|
||||
}
|
||||
|
||||
m_mappings.reserve(10);
|
||||
}
|
||||
|
||||
void* upnp::drain_state()
|
||||
|
|
Loading…
Reference in New Issue