Skip to content
Permalink
Browse files
[FIXED JENKINS-38473] Set a short timeout on the socket when using it…
… to wake the acceptor thread. (#2564)

* [FIXED JENKINS-38473] Set a short timeout on the socket when using it to wake the acceptor thread.

* [JENKINS-38473] Remove leftover typing in wrong window
  • Loading branch information
stephenc authored and oleg-nenashev committed Oct 1, 2016
1 parent d7598f1 commit 1689f6b7a21fc910a186e092227780c614ed7443
Showing with 1 addition and 0 deletions.
  1. +1 −0 core/src/main/java/hudson/TcpSlaveAgentListener.java
@@ -170,6 +170,7 @@ public void shutdown() {
if (localAddress instanceof InetSocketAddress) {
InetSocketAddress address = (InetSocketAddress) localAddress;
Socket client = new Socket(address.getHostName(), address.getPort());
client.setSoTimeout(1000); // waking the acceptor loop should be quick
new PingAgentProtocol().connect(client);
}
} catch (IOException e) {

0 comments on commit 1689f6b

Please sign in to comment.