Skip to content

Gracefully handle web socket closure by clients#33480

Merged
rosstimothy merged 1 commit intomasterfrom
tross/ws_client_close
Oct 16, 2023
Merged

Gracefully handle web socket closure by clients#33480
rosstimothy merged 1 commit intomasterfrom
tross/ws_client_close

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

@rosstimothy rosstimothy commented Oct 13, 2023

Updates the terminal stream to detect when the web socket is closed by the UI via setting the close handler. This reduces the time it takes the server to know the client closed the connection from the value of the keep alive interval in the networking config (default 5m) to as soon as a user closes the tab. Prior to this any session that was terminated by closing the browser tab would have an active session tracker until the web socket ping loop, which runs at the keep alive interval, failed. Some logging was also cleaned up to reduce the amount of spam that appears as a result of a session being terminated by a user.

Changelog: Terminate web ssh sessions right away when a user closes the tab

Updates the terminal stream to detect when the web socket is closed
by the UI via setting the close handler. This reduces the time it
takes the server to know the client closed the connection from the
value of the keep alive interval in the networking config (default 5m)
to as soon as a user closes the tab. Prior to this any session that
was terminated by closing the browser tab would have an active
session tracker until the web socket ping loop, which runs at the
keep alive interval, failed. Some logging was also cleaned up to
reduce the amount of spam that appears as a result of a session
being terminated by a user.
@rosstimothy rosstimothy marked this pull request as ready for review October 13, 2023 23:01
@github-actions github-actions Bot requested review from Tener and r0mant October 13, 2023 23:02
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from r0mant October 16, 2023 06:56
@rosstimothy rosstimothy added this pull request to the merge queue Oct 16, 2023
Merged via the queue into master with commit 687ad89 Oct 16, 2023
@rosstimothy rosstimothy deleted the tross/ws_client_close branch October 16, 2023 13:30
@public-teleport-github-review-bot
Copy link
Copy Markdown

@rosstimothy See the table below for backport results.

Branch Result
branch/v12 Failed
branch/v13 Failed
branch/v14 Failed

rosstimothy added a commit that referenced this pull request Oct 16, 2023
Updates the terminal stream to detect when the web socket is closed
by the UI via setting the close handler. This reduces the time it
takes the server to know the client closed the connection from the
value of the keep alive interval in the networking config (default 5m)
to as soon as a user closes the tab. Prior to this any session that
was terminated by closing the browser tab would have an active
session tracker until the web socket ping loop, which runs at the
keep alive interval, failed. Some logging was also cleaned up to
reduce the amount of spam that appears as a result of a session
being terminated by a user.
rosstimothy added a commit that referenced this pull request Oct 16, 2023
Updates the terminal stream to detect when the web socket is closed
by the UI via setting the close handler. This reduces the time it
takes the server to know the client closed the connection from the
value of the keep alive interval in the networking config (default 5m)
to as soon as a user closes the tab. Prior to this any session that
was terminated by closing the browser tab would have an active
session tracker until the web socket ping loop, which runs at the
keep alive interval, failed. Some logging was also cleaned up to
reduce the amount of spam that appears as a result of a session
being terminated by a user.
rosstimothy added a commit that referenced this pull request Oct 16, 2023
Updates the terminal stream to detect when the web socket is closed
by the UI via setting the close handler. This reduces the time it
takes the server to know the client closed the connection from the
value of the keep alive interval in the networking config (default 5m)
to as soon as a user closes the tab. Prior to this any session that
was terminated by closing the browser tab would have an active
session tracker until the web socket ping loop, which runs at the
keep alive interval, failed. Some logging was also cleaned up to
reduce the amount of spam that appears as a result of a session
being terminated by a user.
github-merge-queue Bot pushed a commit that referenced this pull request Oct 17, 2023
Updates the terminal stream to detect when the web socket is closed
by the UI via setting the close handler. This reduces the time it
takes the server to know the client closed the connection from the
value of the keep alive interval in the networking config (default 5m)
to as soon as a user closes the tab. Prior to this any session that
was terminated by closing the browser tab would have an active
session tracker until the web socket ping loop, which runs at the
keep alive interval, failed. Some logging was also cleaned up to
reduce the amount of spam that appears as a result of a session
being terminated by a user.
github-merge-queue Bot pushed a commit that referenced this pull request Oct 17, 2023
Updates the terminal stream to detect when the web socket is closed
by the UI via setting the close handler. This reduces the time it
takes the server to know the client closed the connection from the
value of the keep alive interval in the networking config (default 5m)
to as soon as a user closes the tab. Prior to this any session that
was terminated by closing the browser tab would have an active
session tracker until the web socket ping loop, which runs at the
keep alive interval, failed. Some logging was also cleaned up to
reduce the amount of spam that appears as a result of a session
being terminated by a user.
github-merge-queue Bot pushed a commit that referenced this pull request Oct 17, 2023
Updates the terminal stream to detect when the web socket is closed
by the UI via setting the close handler. This reduces the time it
takes the server to know the client closed the connection from the
value of the keep alive interval in the networking config (default 5m)
to as soon as a user closes the tab. Prior to this any session that
was terminated by closing the browser tab would have an active
session tracker until the web socket ping loop, which runs at the
keep alive interval, failed. Some logging was also cleaned up to
reduce the amount of spam that appears as a result of a session
being terminated by a user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants