未验证 提交 abf46954 编写于 作者: O Oleg Nenashev 提交者: GitHub

Merge pull request #4263 from daniel-beck/JENKINS-59267

[JENKINS-59267] Increase ping frequency to prevent timeouts, and make it configurable
......@@ -335,11 +335,11 @@ public class CLI {
@Override
public void run() {
try {
Thread.sleep(10_000);
Thread.sleep(PING_INTERVAL);
while (!connection.complete) {
LOGGER.fine("sending ping");
connection.sendEncoding(Charset.defaultCharset().name()); // no-op at this point
Thread.sleep(10_000);
Thread.sleep(PING_INTERVAL);
}
} catch (IOException | InterruptedException x) {
LOGGER.log(Level.WARNING, null, x);
......@@ -406,4 +406,6 @@ public class CLI {
}
static final Logger LOGGER = Logger.getLogger(CLI.class.getName());
private static final int PING_INTERVAL = Integer.getInteger(CLI.class.getName() + ".pingInterval", 3_000); // JENKINS-59267
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册