Fix multiple status streams when reconnecting

This commit is contained in:
世界
2025-12-19 19:26:16 +08:00
parent 7bddeed04a
commit 90a1022ec2
2 changed files with 3 additions and 3 deletions
+1 -3
View File
@@ -92,9 +92,7 @@ public class CommandClient: ObservableObject {
if isConnected {
return
}
if let connectTask {
connectTask.cancel()
}
disconnect()
connectTask = Task {
await performConnection()
}