TYzzt commented on code in PR #7549: URL: https://github.com/apache/inlong/pull/7549#discussion_r1128991249
########## inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/conf/ConfigJetty.java: ########## @@ -62,10 +62,11 @@ public ConfigJetty(JobManager jobManager, TriggerManager triggerManager) { } private void initJetty() throws Exception { - ServerConnector connector = new ServerConnector(this.server); - connector.setPort(conf.getInt( - AgentConstants.AGENT_HTTP_PORT, AgentConstants.DEFAULT_AGENT_HTTP_PORT)); - server.setConnectors(new Connector[]{connector}); + try (ServerConnector connector = new ServerConnector(this.server)) { + connector.setPort(conf.getInt( + AgentConstants.AGENT_HTTP_PORT, AgentConstants.DEFAULT_AGENT_HTTP_PORT)); + server.setConnectors(new Connector[]{connector}); + } Review Comment: restored -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org