server updates
This commit is contained in:
parent
716906ee7c
commit
3f1f6e4893
@ -22,8 +22,8 @@ struct Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[tonic::async_trait]
|
#[tonic::async_trait]
|
||||||
impl<E> Relay for Handler {
|
impl Relay for Handler {
|
||||||
}type StreamStream =
|
type StreamStream =
|
||||||
Pin<Box<dyn Stream<Item = Result<HidReport, Status>> + Send + 'static>>;
|
Pin<Box<dyn Stream<Item = Result<HidReport, Status>> + Send + 'static>>;
|
||||||
|
|
||||||
async fn stream(
|
async fn stream(
|
||||||
@ -34,7 +34,7 @@ impl<E> Relay for Handler {
|
|||||||
let mut in_stream = request.into_inner();
|
let mut in_stream = request.into_inner();
|
||||||
let kb = self.kb.clone();
|
let kb = self.kb.clone();
|
||||||
let ms = self.ms.clone();
|
let ms = self.ms.clone();
|
||||||
let (tx, rx) = tokio::sync::mpsc::channel::<Result<HidReport, E>>(32);
|
let (tx, rx) = tokio::sync::mpsc::channel::<Result<HidReport, Status>>(32);
|
||||||
|
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
// catch panics so that they are logged instead of killing the task silently
|
// catch panics so that they are logged instead of killing the task silently
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user