Skip to content

Conversation

@gjsjohnmurray
Copy link
Contributor

This PR prevents /terminalsocket sessions from remaining after user has closed the browser window or issued the /logout command.

Prior to this fix the sessions would linger for 15 minutes, consuming license slots unnecessarily.

Copy link
Member

@nikitaeverywhere nikitaeverywhere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for a valuable contribution. Indeed, there was such a problem.

if (message.error '= "") {
if (message.error '[ "ERROR #7951") { // don't try and send message if it was a WS close error
set st = ..Send("error", message.error)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like there's a missing else statement. What happens if the error is not # 7591?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the error message can be sent anywhere because the websocket has been closed. Line 197 will quit from the loop, and the new EndSession set will happen.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Thanks!

@nikitaeverywhere nikitaeverywhere merged commit 9570c4f into intersystems-community:master Jul 6, 2022
@gjsjohnmurray gjsjohnmurray deleted the endsession branch July 6, 2022 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants