Skip to content

Commit fa5374b

Browse files
authored
fix(rpc): log errors when sending response to peer fails (#101)
* fix(rpc): log errors when sending response to peer fails * Fix fmt stuff
1 parent 3eb3537 commit fa5374b

File tree

1 file changed

+5
-5
lines changed
  • src/agent-client-protocol/src

1 file changed

+5
-5
lines changed

src/agent-client-protocol/src/rpc.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,11 @@ where
285285
spawn(
286286
async move {
287287
let result = handler.handle_request(request).await;
288-
outgoing_tx
289-
.unbounded_send(OutgoingMessage::Response(Response::new(
290-
id, result,
291-
)))
292-
.ok();
288+
if let Err(e) = outgoing_tx.unbounded_send(
289+
OutgoingMessage::Response(Response::new(id, result)),
290+
) {
291+
log::error!("failed to send response to peer: {e:?}");
292+
}
293293
}
294294
.boxed_local(),
295295
);

0 commit comments

Comments
 (0)