Code optimization and logic refactoring

pull/909/head
chen.ma 3 years ago
parent dc9c36691e
commit 322b9b8aa1

@ -79,7 +79,7 @@ public class DefaultPublisher extends Thread implements EventPublisher {
private void openEventHandler() {
try {
int waitTimes = 60;
for (; ; ) {
for (;;) {
if (shutdown || hasSubscriber() || waitTimes <= 0) {
break;
}
@ -90,7 +90,7 @@ public class DefaultPublisher extends Thread implements EventPublisher {
}
waitTimes--;
}
for (; ; ) {
for (;;) {
if (shutdown) {
break;
}

@ -105,7 +105,7 @@ public class LongPollingService {
@Override
public void run() {
try {
for (Iterator<ClientLongPolling> iter = allSubs.iterator(); iter.hasNext(); ) {
for (Iterator<ClientLongPolling> iter = allSubs.iterator(); iter.hasNext();) {
ClientLongPolling clientSub = iter.next();
String identity = groupKey + GROUP_KEY_DELIMITER + identify;
List<String> parseMapForFilter = CollectionUtil.newArrayList(identity);

Loading…
Cancel
Save