Skip to content

Commit 79597e9

Browse files
authored
Don't panic on unknown token_id in on_grpc_close. (#154)
Signed-off-by: Protryon <[email protected]>
1 parent 1dfa72d commit 79597e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/dispatcher.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use crate::hostcalls;
1616
use crate::traits::*;
1717
use crate::types::*;
1818
use hashbrown::HashMap;
19+
use log::trace;
1920
use std::cell::{Cell, RefCell};
2021

2122
thread_local! {
@@ -535,7 +536,8 @@ impl Dispatcher {
535536
root.on_grpc_stream_close(token_id, status_code)
536537
}
537538
} else {
538-
panic!("invalid token_id")
539+
// TODO: change back to a panic once underlying issue is fixed.
540+
trace!("on_grpc_close: invalid token_id, a non-connected stream has closed");
539541
}
540542
}
541543
}

0 commit comments

Comments
 (0)