-
Notifications
You must be signed in to change notification settings - Fork 189
IPv4 is sometimes empty in found service entries #27
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
Comments
I hit the same issue. The problem (in my case), was the entry with the IPV4 address comes in immediately after the IV6 one, but, since the entry was sent (and is correspondingly in sentEntries), it isn't sent again. in client.mainloop, the line that prevents seeing the IPV4 entry is:
@grandcat I'm more than willing to work up a patch for this, (this assumes it is something that you'd like to see fixed. FWIW avahi-browse will show both entries separately), but it would probably be best to have some idea of how you'd like to see this handled. For example, one option is to delete the entry from sentEntries if it is updated. This would result in sending two entries. The IP association loop then becomes:
I'm not sure of a way to wait for both IPV4/6 that isn't brittle. At least if both entries are sent then the user can implement their own wait and merge strategy. |
I am aware of this problem. As it is time-critical and dependent on the environment, it might be appear or not. The idea to tackle this in future would be as follows: As it is an API break, I would like to introduce a versioning/vendoring first, so people could stick to the old API. |
FWIW, it's currently possible to do such a wait and combine using I think that it's a surprising behavior from a end-user point of view. Wouldn't introducing a new method to return a slice of |
Nice workaround :) Instead, |
does anybody plan to fix this? |
We‘re seeing the same problem in evcc-io/evcc#1217 (reply in thread) |
What is required to reproduce this issue? I'm using Is it correct to assume, that this issue will only trigger if there are two separate services announced, one for |
In some case, only IPv4 or IPv6 is returned. For the usecase which requre IPv4 address, made possible to specify stratedy. This may resolve grandcat#27
Hi,
I have a question. With provided example code, if I start and stop
client.go
a couple times, IPv4 array would be empty in found service entry sometimes.Is this normal or a bug?
Thank you.
The text was updated successfully, but these errors were encountered: