mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-03 11:31:53 +08:00
refactor: 升级依赖版本并优化构建系统
- 升级核心依赖 (axum 0.8, tower-http 0.6, alsa 0.11 等) - 简化交叉编译配置,切换至 Debian 11 提高兼容性 - 新增 Debian 包打包支持 (debuerreotype 模板) - 移除独立的 mjpeg 解码器,简化视频模块 - 静态链接 libx264/libx265/libopus 到二进制
This commit is contained in:
@@ -284,6 +284,7 @@ mod tests {
|
||||
right_alt: false,
|
||||
right_meta: false,
|
||||
},
|
||||
is_usb_hid: false,
|
||||
};
|
||||
|
||||
let encoded = encode_keyboard_event(&event);
|
||||
|
||||
@@ -50,7 +50,7 @@ async fn handle_hid_socket(socket: WebSocket, state: Arc<AppState>) {
|
||||
vec![RESP_ERR_HID_UNAVAILABLE]
|
||||
};
|
||||
|
||||
if sender.send(Message::Binary(initial_response)).await.is_err() {
|
||||
if sender.send(Message::Binary(initial_response.into())).await.is_err() {
|
||||
error!("Failed to send initial HID status");
|
||||
return;
|
||||
}
|
||||
@@ -66,7 +66,7 @@ async fn handle_hid_socket(socket: WebSocket, state: Arc<AppState>) {
|
||||
warn!("HID controller not available, ignoring message");
|
||||
}
|
||||
// Send error response (optional, for client awareness)
|
||||
let _ = sender.send(Message::Binary(vec![RESP_ERR_HID_UNAVAILABLE])).await;
|
||||
let _ = sender.send(Message::Binary(vec![RESP_ERR_HID_UNAVAILABLE].into())).await;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ async fn handle_hid_socket(socket: WebSocket, state: Arc<AppState>) {
|
||||
if log_throttler.should_log("text_message_rejected") {
|
||||
debug!("Received text message (not supported): {} bytes", text.len());
|
||||
}
|
||||
let _ = sender.send(Message::Binary(vec![RESP_ERR_INVALID_MESSAGE])).await;
|
||||
let _ = sender.send(Message::Binary(vec![RESP_ERR_INVALID_MESSAGE].into())).await;
|
||||
}
|
||||
Ok(Message::Ping(data)) => {
|
||||
let _ = sender.send(Message::Pong(data)).await;
|
||||
|
||||
Reference in New Issue
Block a user