mengw15 commented on code in PR #4377:
URL: https://github.com/apache/texera/pull/4377#discussion_r3096152946


##########
frontend/src/app/workspace/service/workflow-websocket/workflow-websocket.service.ts:
##########
@@ -131,8 +133,8 @@ export class WorkflowWebsocketService {
       this.webSocketResponseSubject.next(event as TexeraWebsocketEvent)
     );
 
-    // refresh connection status
-    this.websocketEvent().subscribe(evt => {
+    // refresh connection status — store the reference so it is torn down in 
closeWebsocket()
+    this.statusUpdateSubscription = this.websocketEvent().subscribe(evt => {

Review Comment:
   Thanks for the comment! openWebsocket() actually calls this.closeWebsocket() 
as its first statement, which unsubscribes the previous 
statusUpdateSubscription before the reassignment. so I think we are good



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