-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: UDPConn.WriteToUDP not sending anything on Windows #38202
Comments
Without code to reproduce this (ideally a minimal reproduction), it is extremely difficult to diagnose what is going on. Do you have an example client/server setup you could provide? Perhaps this would also be more appropriate for hashicorp/mdns#80 and once you’ve determined it’s an issue with the Go toolchain, you could then revisit this issue. |
Please see the call stack for verification of the Golang toolchain. |
Does this work as expected on platforms other than Windows? |
Thanks. That’s helpful. Can you attach text instead of images, please? Images are harder to read and hurt accessibility. |
Sure. Will do. |
Tentatively marking this a release blocker for 1.15 while we gather more info. |
Could be due to one of the known bugs listed here: https://golang.org/pkg/net/#pkg-note-BUG |
Just wanted to note I've updated Go (same problem, however) go version go1.14.1 windows/amd64 |
Any updates on this or any potential workarounds? |
@jmarkel44 it’s been two days. Please be patient. |
I don't understand the test program, as it doesn't wait for the goroutine to complete. What happens if you use a |
There's a Timeout in the Lookup function. The code above is the recommended way to use the library too, based on github.com/hashicorp/mdns. As noted, this works perfectly on a RPi. Thanks. |
I'm sure you're right, but when I look at that program it looks clearly incorrect. Humor me. Thanks. |
What results are you getting when running the program? |
I don't have a Windows system. |
But on my GNU/Linux system I get
|
so if you do something like
are there any mDNS devices on the network? |
I don't have It would not surprise me if there are no mDNS devices on the network. |
I never used this package github.com/hashicorp/mdns - I don't know what it does. But I tried running your program on Linux:
and on Windows
And 2 outputs looks very similar to me. If you think the problem is in Thank you. Alex |
So this came down to a set-interface issue on the windows platform. traversing the entire list of possible interfaces resolves the issue we were seeing with mdns package. Thanks for the help! Closing the ticket. |
Please, could you provide a code example of the solution? |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
N/A
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Trying to run an mdns query using the hashicorp/mdns client
https://github.com/hashicorp/mdns
What did you expect to see?
Expected to see a list of devices with mDNS services.
What did you see instead?
No results.
Please see the attached call stack.
With Wireshark running, I was not seeing any packets when the program was invoked.

It's as if the call into the dll (WSASentTo()) to send the UDP message is not working correctly, though no errors are thrown when stepping through the code.
The text was updated successfully, but these errors were encountered: