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


##########
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:
   Agreed — that test would have passed with the `destroy()` call removed, 
which is exactly the class of gap that let the original hook go unexercised. 
Added `GraphQLServletTest.destroy_shutsDownTheSocketCreatorScheduler` in 
`07ffe7f2d`: it configures the servlet, destroys it, and asserts the creator's 
scheduler is shut down. `isShutdown()` is now public and the servlet exposes 
the creator package-privately for the test.



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