update kcp-sys (#12419)

1. Update kcp-sys to send KCP in frames to avoid potential crashes.
2. Fix the issue when the controling side is closed, the kcp connection close is not immediately recognized by the controlled end.
  * Unless the controling side receives the close reason, force the sending of the close reason to the controlled end when using KCP, and delay for 30ms to ensure the message is sent successfully.
  * Move the CloseReason receiving forward, as this message needs to be received when unauthorized, especially for kcp.

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2025-07-25 13:22:52 +08:00
committed by GitHub
parent 2afd538cf1
commit 9409912344
3 changed files with 36 additions and 16 deletions

3
Cargo.lock generated
View File

@@ -3651,7 +3651,7 @@ dependencies = [
[[package]]
name = "kcp-sys"
version = "0.1.0"
source = "git+https://github.com/rustdesk-org/kcp-sys#1e5e30ab8b8c2f7787ab0f88822de36476531562"
source = "git+https://github.com/rustdesk-org/kcp-sys#32a6c09fc6223f54aea83981a6aa8995931d29be"
dependencies = [
"anyhow",
"auto_impl",
@@ -3660,6 +3660,7 @@ dependencies = [
"bytes",
"cc",
"dashmap 6.1.0",
"log",
"parking_lot",
"rand 0.8.5",
"thiserror 2.0.11",