Fix/arboard clipboard context timeout #7217
Merged
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 may fix #6859 on Linux platform.
Issue
arboard
uses a fixed duration(10ms) as the timeout for x11 connection.https://github.com/1Password/arboard/blob/77e0e078eb460ac2fa0eda96124163c11ef6b2d1/src/platform/linux/x11.rs#L142
But for RustDesk, sometimes it needs about 20ms or more to connect x11.
So the text clipboard is not stable.
And if the following line fails, the "copy & paste" from client to host will not work anymore in that connection.
rustdesk/src/client.rs
Line 726 in 7b31761
Fixed
In this PR, retry and increasing timeout are added for
new()
andget_text()
.PR for
arboard
is also submitted.