Closed b-kamphorst closed 3 weeks ago
Although the test passes, the example in #50 still fails.
Observation: if I first register the service with name NoSpaces
and then start browsing, then in function lookupType
, case req := <-ch:
, for _, srv := range cache.Services()
, the services have a non-empty list for srv.ifaceIPs
. If the service was registered with name With Spaces
instead, then the srv.ifaceIPs
list is empty.
However, I'm not sure about the fix thus far (should question matching logic be altered, or rather the question itself) and I start to delve too deep for my understanding, so I'll pause here. I look forward to your thoughts!
@brutella friendly asking when you expect to have time to look into this issue/PR?
Sorry for the delay. Trying to look into this in the next couple of days.
Fixed in v1.2.14
.
Closes #50
@brutella the test that I added passes for v1.2.11 and fails for v1.2.12 and v1.2.13. I identified the issue to the question/response logic as expected. Either the question should have an escaped name, or the question handler should match to the unescaped service name. I thought that it should be the latter, but please review.
Note: the test that I added is a copy of the test
TestRegisterServiceWithExplicitIP
with changed service name. No further thought went into that, so feel free to simplify the test.