We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98eb36e commit 478a996Copy full SHA for 478a996
grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/fork/ForkedGrailsProcess.groovy
@@ -331,6 +331,18 @@ abstract class ForkedGrailsProcess {
331
ServerSocket parentAvailabilityServer = new ServerSocket(0)
332
def parentPort = parentAvailabilityServer.localPort
333
System.setProperty(PARENT_PROCESS_PORT, String.valueOf(parentPort))
334
+
335
336
+ Thread.start {
337
+ while(!parentAvailabilityServer.isClosed()) {
338
+ try {
339
+ // simply accept and close the socket
340
+ parentAvailabilityServer.accept().close()
341
+ } catch (e) {
342
+ // ignore
343
+ }
344
345
346
Runtime.addShutdownHook {
347
try {
348
parentAvailabilityServer?.close()
0 commit comments