stricklandrbls commented on issue #1021:
URL:
https://github.com/apache/daffodil-vscode/issues/1021#issuecomment-2691261644
@scholarsmate @JeremyYao
I took some time to look at this and it's coming back to me now.
<details><summary><b>Tail of Data Editor Log</b>
```
{"level":"ERROR","time":"2025-02-28T17:12:35.553Z","pid":83290,"hostname":"","fn":"getServerHeartbeat","err":{"msg":"14
UNAVAILABLE: No connection established. Last error: connect ECONNREFUSED
127.0.0.1:9000 (2025-02-28T17:12:29.255Z)","details":"No connection
established. Last error: connect ECONNREFUSED 127.0.0.1:9000
(2025-02-28T17:12:29.255Z)","code":14,...}
{"level":"ERROR","time":"2025-02-28T17:12:36.558Z","pid":83290,"hostname":"","fn":"getServerHeartbeat","err":{"msg":"14
UNAVAILABLE: No connection established. Last error: connect ECONNREFUSED
127.0.0.1:9000 (2025-02-28T17:12:29.255Z)","details":"No connection
established. Last error: connect ECONNREFUSED 127.0.0.1:9000
(2025-02-28T17:12:29.255Z)","code":14,"stack":...}
{"level":"DEBUG","time":"2025-02-28T17:12:36.830Z","pid":83290,"hostname":"","fn":"destroySession","rqst":{"id":"L2hvbWUvb3Jpb24vQ29kZS90aGlyZHBhcnR5L1BORy9zcmMvdGVzdC9yZXNvdXJjZXMvY29tL21pdHJlL3BuZy9QbmdTdWl0ZS0yMDEzamFuMTMvUG5nU3VpdGUucG5n"}}
{"level":"ERROR","time":"2025-02-28T17:12:36.833Z","pid":83290,"hostname":"","fn":"destroySession","rqst":{"id":"L2hvbWUvb3Jpb24vQ29kZS90aGlyZHBhcnR5L1BORy9zcmMvdGVzdC9yZXNvdXJjZXMvY29tL21pdHJlL3BuZy9QbmdTdWl0ZS0yMDEzamFuMTMvUG5nU3VpdGUucG5n"},"err":{"msg":"14
UNAVAILABLE: No connection established. Last error: connect ECONNREFUSED
127.0.0.1:9000 (2025-02-28T17:12:29.255Z)","details":"No connection
established. Last error: connect ECONNREFUSED 127.0.0.1:9000
(2025-02-28T17:12:29.255Z)","code":14,"stack":...}
```
</summary></details>
---
This issue stems from what I had mentioned previously where, the
`ExtensionContext` is the VSCode extension window in it's entirety and since
the `DataEditorClient` is pushing its disposables onto the
`ctx.subscriptions[]` they're never being executed because the
`ExtensionContext` has not been disposed (closing the window).
## Solution
The fix for this would be to attach the data editor's disposables,
specifically the `getServerHeartbeatIntervalId` timer, onto the data editor
panel's `onDidDispose`.
Currently, that interval is only being cleared when the
`removeActiveSession` function is called which only gets invoked from
`destroySession` which, finally, only gets invoked when the
`DataEditorClient.dispose()` is called.
--
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]