Skip to content

Commit 6efbe0e

Browse files
committed
Try exiting the JVM gracefully when stdin is closed
1 parent 286f82f commit 6efbe0e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/sonarsource/sonarqube/mcp/transport/StdioServerTransportProvider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ private void startInboundProcessing() {
252252
session.close();
253253
}
254254
inboundSink.tryEmitComplete();
255+
// Exit the JVM when stdin closes so Docker --rm can clean up the container
256+
System.exit(0);
255257
}
256258
});
257259
}

0 commit comments

Comments
 (0)