moved UPnP instance to Transports. Use actual port from RouterContext

This commit is contained in:
orignal 2015-05-06 12:19:20 -04:00
parent 7c13194d5a
commit 2442d0e910
5 changed files with 33 additions and 33 deletions

View file

@ -109,6 +109,10 @@ namespace transport
void Transports::Start ()
{
#ifdef USE_UPNP
m_UPnP.Start ();
LogPrint(eLogInfo, "UPnP started");
#endif
m_DHKeysPairSupplier.Start ();
m_IsRunning = true;
m_Thread = new std::thread (std::bind (&Transports::Run, this));
@ -141,6 +145,10 @@ namespace transport
void Transports::Stop ()
{
#ifdef USE_UPNP
m_UPnP.Stop ();
LogPrint(eLogInfo, "UPnP stopped");
#endif
m_PeerCleanupTimer.cancel ();
m_Peers.clear ();
if (m_SSUServer)