Skip to content

Commit a78fb96

Browse files
author
uuhan
committed
use try_send insted of send
1 parent 34fb986 commit a78fb96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/subscriber.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ impl Subscribers {
296296

297297
for (_id, (waker, sender)) in subs.iter() {
298298
let (tx, rx) = OneShot::pair();
299-
if sender.send(rx).is_err() {
299+
if let Err(err) = sender.try_send(rx) {
300+
error!("send error: {:?}", err);
300301
continue;
301302
}
302303
subscribers.push((waker.clone(), tx));

0 commit comments

Comments
 (0)