Skip to content

Commit

Permalink
Don't panic on broken pipe for add device
Browse files Browse the repository at this point in the history
  • Loading branch information
jkcoxson committed Jan 8, 2025
1 parent 15fd214 commit 86c601e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ async fn handle_stream(
let mut p = Plist::new_dict();
p.dict_set_item("Result", "OK".into()).unwrap();
let res: Vec<u8> = RawPacket::new(p, 1, 8, parsed.tag).into();
socket.write_all(&res).await.unwrap();
if let Err(e) = socket.write_all(&res).await {
warn!("Failed to send back success message: {e:?}");
}

// No more further communication for this packet
return;
Expand Down

0 comments on commit 86c601e

Please sign in to comment.