Skip to content

Commit 86c601e

Browse files
committed
Don't panic on broken pipe for add device
1 parent 15fd214 commit 86c601e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ async fn handle_stream(
301301
let mut p = Plist::new_dict();
302302
p.dict_set_item("Result", "OK".into()).unwrap();
303303
let res: Vec<u8> = RawPacket::new(p, 1, 8, parsed.tag).into();
304-
socket.write_all(&res).await.unwrap();
304+
if let Err(e) = socket.write_all(&res).await {
305+
warn!("Failed to send back success message: {e:?}");
306+
}
305307

306308
// No more further communication for this packet
307309
return;

0 commit comments

Comments
 (0)