Revert "fix: 尝试修复断联问题"
This reverts commit 0b7789838bb6cc63d4d6775ef764b7073d451ca6.
This commit is contained in:
parent
2a9ab127c5
commit
c252b11d3c
@ -250,30 +250,21 @@ public class RtkClusterService implements ApplicationRunner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (n > 0 && isLikelyText(probe, n)) {
|
if (n > 0 && isLikelyText(probe, n)) {
|
||||||
Socket previous = outConn;
|
if (!isSocketAlive(outConn)) {
|
||||||
if (!isSocketAlive(previous)) {
|
|
||||||
outConn = s;
|
outConn = s;
|
||||||
assigned = true;
|
assigned = true;
|
||||||
LOGGER.debug("Endpoint {} OUT connected", port);
|
LOGGER.debug("Endpoint {} OUT connected", port);
|
||||||
pumpOut(s, probe, n);
|
pumpOut(s, probe, n);
|
||||||
} else {
|
} else {
|
||||||
LOGGER.info("Endpoint {} replacing existing OUT connection", port);
|
LOGGER.info("Endpoint {} additional OUT connection detected; keeping existing", port);
|
||||||
closeQuietly(previous);
|
|
||||||
outConn = s;
|
|
||||||
assigned = true;
|
|
||||||
pumpOut(s, probe, n);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Socket previous = inConn;
|
if (!isSocketAlive(inConn)) {
|
||||||
if (!isSocketAlive(previous)) {
|
|
||||||
inConn = s;
|
inConn = s;
|
||||||
assigned = true;
|
assigned = true;
|
||||||
LOGGER.debug("Endpoint {} IN connected", port);
|
LOGGER.debug("Endpoint {} IN connected", port);
|
||||||
} else {
|
} else {
|
||||||
LOGGER.info("Endpoint {} replacing existing IN connection", port);
|
LOGGER.info("Endpoint {} additional IN connection detected; keeping existing", port);
|
||||||
closeQuietly(previous);
|
|
||||||
inConn = s;
|
|
||||||
assigned = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user