fix failure to increment port when retrying socket binding

This commit is contained in:
arvidn 2016-03-14 18:52:43 -04:00
parent fb85e5e60f
commit c5861bcc04
1 changed files with 6 additions and 0 deletions

View File

@ -2057,6 +2057,9 @@ retry:
if (listen_port_retries > 0)
{
m_listen_interface.port(m_listen_interface.port() + 1);
// update the actual port m_listen_interface was derived from also
if (!m_listen_interfaces.empty())
m_listen_interfaces[0].second += 1;
--listen_port_retries;
goto retry;
}
@ -2130,6 +2133,9 @@ retry:
if (listen_port_retries > 0)
{
m_listen_interface.port(m_listen_interface.port() + 1);
// update the actual port m_listen_interface was derived from also
if (!m_listen_interfaces.empty())
m_listen_interfaces[0].second += 1;
--listen_port_retries;
goto retry;
}