yancyang1989-gif commented on issue #2229:
URL: https://github.com/apache/plc4x/issues/2229#issuecomment-3248440296

   > 你好[@glcj](https://github.com/glcj), 在断开的连接上调用 close 会引发异常。最终必须使用
   > 
   > ```
   > plcConnection = connectionManager.getConnection(plcConnectionString);
   > ```
   > 
   > 我曾尝试过这样做,在这种情况下,当新连接正确打开时,会创建一个新池,而前一个连接则处于等待状态。 我还尝试手动关闭 
DefaultNettyPlcConnection,如下所示:
   > 
   > ```
   > EventLoopGroup group = ((DefaultNettyPlcConnection) 
connection).getChannel().eventLoop().parent();
   > group.shutdownGracefully();
   > ```
   > 
   > 但它没有帮助。
   
   I think when the connection is accidentally broken, catching the exception 
by try catch when trying getConnection again, executing 
CachedPlcConnectionManager.removeCachedConnection in the catch, and doing 
getConnection again, it is fine


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to