Skip to content

Commit

Permalink
Fix crash in release mode for mdns example
Browse files Browse the repository at this point in the history
control_buffer was going out of scope

Closes #14
  • Loading branch information
mon committed Nov 28, 2023
1 parent 787107b commit 5eca9a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/win.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ impl MulticastSocket {
len: buf.len() as _,
};

let mut control_buffer = [0; CONTROL_PKTINFO_BUFFER_SIZE];
let control = if let Some(pkt_info) = pkt_info {
let mut control_buffer = [0; CONTROL_PKTINFO_BUFFER_SIZE];
let hdr = CMSGHDR {
cmsg_len: CONTROL_PKTINFO_BUFFER_SIZE,
cmsg_level: IPPROTO_IP,
Expand Down

0 comments on commit 5eca9a8

Please # to comment.