Skip to content

Commit

Permalink
fix wild reconnect after too many times
Browse files Browse the repository at this point in the history
  • Loading branch information
melode11 committed Jun 3, 2015
1 parent bb08c31 commit 2e94e79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/internal/sio_client_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ namespace sio
unsigned client_impl::next_delay() const
{
//no jitter, fixed power root.
return min<unsigned>(static_cast<unsigned>(m_reconn_delay * pow(1.5,m_reconn_made)),m_reconn_delay_max);
return static_cast<unsigned>(min<double>(m_reconn_delay * pow(1.5,m_reconn_made),m_reconn_delay_max));
}

socket::ptr client_impl::get_socket_locked(string const& nsp)
Expand Down

0 comments on commit 2e94e79

Please sign in to comment.