refactor: simplify proxy type handling and improve error handling in network commands

This commit is contained in:
Tunglies
2025-05-16 00:09:34 +08:00
parent 92ae277e3a
commit 53a46d0dc6
11 changed files with 30 additions and 35 deletions

View File

@@ -271,7 +271,7 @@ impl Traffic {
// 设置流超时控制
let traffic_stream = ws_stream
.take_while(|msg| {
let continue_stream = matches!(msg, Ok(_));
let continue_stream = msg.is_ok();
async move { continue_stream }.boxed()
})
.filter_map(|msg| async move {