We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e94e79 commit 8ca73b8Copy full SHA for 8ca73b8
src/internal/sio_client_impl.cpp
@@ -328,7 +328,8 @@ namespace sio
328
unsigned client_impl::next_delay() const
329
{
330
//no jitter, fixed power root.
331
- return static_cast<unsigned>(min<double>(m_reconn_delay * pow(1.5,m_reconn_made),m_reconn_delay_max));
+ unsigned reconn_made = min<unsigned>(m_reconn_made,32);//protect the pow result to be too big.
332
+ return static_cast<unsigned>(min<double>(m_reconn_delay * pow(1.5,reconn_made),m_reconn_delay_max));
333
}
334
335
socket::ptr client_impl::get_socket_locked(string const& nsp)
0 commit comments