-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TDP/RDP termination #13912
Fix TDP/RDP termination #13912
Conversation
…rance that the tdp connection is closed to c.close()
Co-authored-by: Zac Bergquist <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also curious how this behaves if windows terminates the connection - do we see any confusing warnings or errors in the console?
(test by killing/rebooting a windows VM during a session)
Good question -- the screen just freezes for a while (which is sorta confusing), until the rust rdp client times out here
Nothing too crazy looking in the logs:
|
@nklaassen @LKozlowski PTAL when you next have a chance |
sorry, misclicked on mobile.. will review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@ibeckermayer See the table below for backport results.
|
In #13479 I cleaned up the Client's API and centralized the connection and memory cleanup, but I also removed a deferred
c.Close()
from the streaming goroutines. This change meant that in the most common case of the TDP input streaming goroutine erroring due to the browser tab being closed:teleport/lib/srv/desktop/rdp/rdpclient/client.go
Lines 285 to 287 in 7c8da82
the RDP streaming goroutine was no longer being terminated immediately, causing it to awkwardly hang around failing calls until the idle timeout (possibly relates to #13723).
This change reintroduces the deferred
c.close()
to streaming goroutines and also adds insurance that the TDP connection is closed inc.close()
, so that whenever one goroutine terminates, the other one isn't left far behind.