server fix
This commit is contained in:
parent
8a1610ce92
commit
9442430453
@ -2,15 +2,14 @@
|
||||
// sever/src/main.rs
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
use anyhow::Context;
|
||||
use futures_util::Stream;
|
||||
use futures_util::{Stream, StreamExt};
|
||||
use std::{pin::Pin, sync::Arc, time::Duration};
|
||||
use tokio::{fs::{File, OpenOptions}, io::AsyncWriteExt, sync::Mutex};
|
||||
use tokio::{fs::{OpenOptions}, io::AsyncWriteExt, sync::Mutex};
|
||||
use tokio_stream::{wrappers::ReceiverStream};
|
||||
use tonic::{transport::Server, Request, Response, Status};
|
||||
use tracing::{error, info, trace, warn};
|
||||
use tracing::{info, trace};
|
||||
use tracing_subscriber::{fmt, EnvFilter};
|
||||
use udev::{Enumerator, MonitorBuilder};
|
||||
use udev::{MonitorBuilder};
|
||||
|
||||
use lesavka_server::{video, usb_reset};
|
||||
|
||||
@ -43,7 +42,7 @@ fn list_gc311_devices() -> anyhow::Result<Vec<String>> {
|
||||
async fn monitor_gc311_disconnect() -> anyhow::Result<()> {
|
||||
let mut mon = MonitorBuilder::new()?
|
||||
.match_subsystem("usb")?
|
||||
.match_property("PRODUCT", "7ca/3311/*")? // vendor: 0x07ca, device 0x3311
|
||||
.match_attribute("PRODUCT", "7ca/3311/*")? // vendor: 0x07ca, device 0x3311
|
||||
.listen()?;
|
||||
|
||||
while let Some(ev) = mon.next() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user