客户端默认启用自动重连,重试延迟为一秒。启动前配置:
client.set_auto_reconnect(true, std::chrono::seconds(2));
// 或关闭自动重试:
client.set_auto_reconnect(false);客户端默认启用自动重连,重试延迟为一秒。启动前配置:
client.set_auto_reconnect(true, std::chrono::seconds(2));
// 或关闭自动重试:
client.set_auto_reconnect(false);