Skip to content

Commit ca17fba

Browse files
committed
agent: Use unbounded_channel for communicating with internal threads
Signed-off-by: Daiki Ueno <[email protected]>
1 parent 040c495 commit ca17fba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

agent/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
182182
rand_bytes(&mut encryption_key)?;
183183

184184
start(async {
185-
let (event_tx, mut event_rx) = mpsc::channel::<EventGroup>(256);
185+
let (event_tx, mut event_rx) = mpsc::unbounded_channel::<EventGroup>();
186186
let handle = runtime::Handle::current();
187187
let mut builder = RingBufferBuilder::new();
188188
builder.add(&skel.maps.ringbuf, |data| {
@@ -193,7 +193,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
193193
Ok(group) => {
194194
let event_tx2 = event_tx.clone();
195195
handle.spawn(async move {
196-
if let Err(e) = event_tx2.send(group).await {
196+
if let Err(e) = event_tx2.send(group) {
197197
info!(error = %e, "error sending event group");
198198
}
199199
});

0 commit comments

Comments
 (0)