Skip to content

Commit 2e94e79

Browse files
committed
fix wild reconnect after too many times
1 parent bb08c31 commit 2e94e79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/internal/sio_client_impl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ namespace sio
328328
unsigned client_impl::next_delay() const
329329
{
330330
//no jitter, fixed power root.
331-
return min<unsigned>(static_cast<unsigned>(m_reconn_delay * pow(1.5,m_reconn_made)),m_reconn_delay_max);
331+
return static_cast<unsigned>(min<double>(m_reconn_delay * pow(1.5,m_reconn_made),m_reconn_delay_max));
332332
}
333333

334334
socket::ptr client_impl::get_socket_locked(string const& nsp)

0 commit comments

Comments
 (0)