Improve management of web sessions when connection changes#1808
Open
isc-bsaviano wants to merge 1 commit into
Open
Improve management of web sessions when connection changes#1808isc-bsaviano wants to merge 1 commit into
isc-bsaviano wants to merge 1 commit into
Conversation
isc-klu
reviewed
Jul 16, 2026
| // For new ones, establish a connection? | ||
| // For orphans, logout and clear the cookies. | ||
| let refreshFilesExplorer = false; | ||
| const newConnections: Set<string> = new Set(); |
Collaborator
There was a problem hiding this comment.
const newConnections = new Set<string>(); is equivalent and more concise.
isc-klu
requested changes
Jul 16, 2026
tobikrs
suggested changes
Jul 16, 2026
Comment on lines
-1524
to
-1535
| if (affectsConfiguration("objectscript.conn") || affectsConfiguration("intersystems.servers")) { | ||
| if (affectsConfiguration("intersystems.servers")) { | ||
| // Gather the server names previously resolved | ||
| const resolvedServers: string[] = []; | ||
| resolvedConnSpecs.forEach((v, k) => resolvedServers.push(k)); | ||
| // Clear the cache | ||
| resolvedConnSpecs.clear(); | ||
| // Resolve them again, sequentially in case user needs to be prompted for credentials | ||
| for await (const serverName of resolvedServers) { | ||
| await resolveConnectionSpec(serverName); | ||
| } | ||
| } |
There was a problem hiding this comment.
First, thank you for this fix! It indeed fixes the problem I reported in #1805.
--
But I noticed one new problem: changes to a server in intersystems.servers no longer take effect until I reload the window.
Reproducable by:
- Connect normally. Set
"objectscript.outputRESTTraffic": trueto see the requests in the "ObjectScript" output. - In
intersystems.servers, change thewebServer.portof that server to a wrong/closed port and save. - The connection stays connected, and the output still shows requests going to the old port.
- Run "Developer: Reload Window". Only now the new port is used, and the connection fails (because the port is wrong).
On 3.8.2 the same change takes effect immediately, without a reload.
--
It looks like the old code re-read the server settings when intersystems.servers changed, and that part was removed in this PR. So the extension seems to keep using the old (cached) connection details until a reload. Maybe the fix needs to re-read / refresh the server spec for the changed servers again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes #1805. I will implement a companion for Language Server as well.