Copilot commented on code in PR #7071:
URL: https://github.com/apache/shenyu/pull/7071#discussion_r4032791461
##########
shenyu-sdk/shenyu-sdk-core/src/main/java/org/apache/shenyu/sdk/core/client/ShenyuSdkClient.java:
##########
@@ -31,7 +31,7 @@
* ShenyuSdkClient.
*/
@SPI
-public interface ShenyuSdkClient {
+public interface ShenyuSdkClient extends AutoCloseable {
Review Comment:
`ShenyuSdkClientFactory` caches one client per type in a static map, so this
bean is shared across application contexts. Once Spring infers `close`,
shutting down one context closes that shared instance but leaves the closed
object cached; a later context can reuse the closed client (and reinitializing
it can overwrite resources still owned by the first context). The factory/bean
ownership needs to be changed or coordinated before making this shared instance
context-closeable.
This issue also appears on line 56 of the same file.
--
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]