修改:断线重连次数判断 bug
This commit is contained in:
parent
1171304a04
commit
44c1cf9f0d
@ -373,8 +373,13 @@ public class ZHubClient extends AbstractConsumer implements IConsumer, IProducer
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
if (retry == 0 || i > 0) {
|
||||
if (retry == 0 || i == 0) {
|
||||
logger.log(Level.WARNING, String.format("ZHubClient[%s] %s Failed 初始化失败!", getGroupid(), retry == 0 ? "init" : "reconnection"), e);
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException interruptedException) {
|
||||
interruptedException.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
logger.log(Level.WARNING, String.format("ZHubClient[%s][%s] reconnection Failed!", getGroupid(), i + 1));
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user