Copilot commented on code in PR #858:
URL: https://github.com/apache/unomi/pull/858#discussion_r3935464626


##########
graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/servlet/GraphQLServlet.java:
##########
@@ -108,16 +108,29 @@ public void init(ServletConfig config) throws 
ServletException {
 
     private WebSocketServletFactory factory;
 
+    private SubscriptionWebSocketFactory socketCreator;
+
+    @Override
+    public void destroy() {
+        try {
+            if (socketCreator != null) {
+                socketCreator.shutdown();

Review Comment:
   The added factory test only verifies that `shutdown()` marks its executor as 
shut down; it would still pass if this `destroy()` call were removed, so it 
does not cover the lifecycle wiring that caused the reported leak. Please add a 
`GraphQLServletTest` that calls `destroy()` after configuration and verifies 
the creator is shut down.



-- 
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