Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

mdns example panics on Windows in release mode, but not in debug mode #14

Closed
Dudemanjude opened this issue May 5, 2022 · 2 comments · Fixed by #16
Closed

mdns example panics on Windows in release mode, but not in debug mode #14

Dudemanjude opened this issue May 5, 2022 · 2 comments · Fixed by #16

Comments

@Dudemanjude
Copy link

First of all, thanks for making such a nice crate. After looking at the source code, I realize what I would be getting into had I needed to implement multicast on all interfaces myself for both Windows and Linux. 😄

But I am having a bit of a problem. Just like the title says, I can run the mdns example in debug mode, and it works perfectly fine, but it panics in release mode with this error:

thread 'main' panicked at 'could not broadcast message to ips being listened: Os { code: 10022, kind
: InvalidInput, message: "An invalid argument was supplied." }', examples\mdns.rs:25:10

I'm also running into this issue in my own project using this crate. It can send out a multicast (checked with Wireshark) in debug mode, but in release, it panics with the same error.

I have multiple different network adapters, WSL's vEthernet, VirtualBox's Host-Only Network, my WiFi adapter, Ethernet (that I'm not using), and ZeroTier One. I ended up on your crate due to my multicasts ending up on WSL's interface, rather than my WiFi adapter's.

If I can provide any more system information, or do some more testing, I'd be happy to help.

@bltavares
Copy link
Owner

bltavares commented May 15, 2022 via email

@mon
Copy link
Contributor

mon commented Nov 24, 2023

Out of curiosity, and since windows-rs is the new hotness, I rewrote the lib to use it. It changed absolutely nothing and produced the same error 😅 One red herring down!

mon added a commit to mon/multicast-socket that referenced this issue Nov 28, 2023
control_buffer was going out of scope

Closes bltavares#14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants