I have tested the issue. With the new code, within approximatively 100 milliseconds, the socket is gone while ant keeps running. PR: 23040 Submitted by: John C. Kendall (jkendall at technologist dot com) git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275217 13f79535-47bb-0310-9956-ffa450edef68master