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

(cherry picked from commit 1689f6b)
  • Loading branch information
stephenc authored and olivergondza committed Oct 10, 2016
1 parent b3ea052 commit d32b32f9115d31fe0f42d1f75eb25ea8af6909ff
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 d32b32f

Please sign in to comment.