Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Empty Consul services list causing program to hang in ConsulNameResolver #11

@msay-via

Description

@msay-via

Hey, I am having an issue where if Consul is running but no services are registered, then the NameResolver.Listener has no addresses to resolve on, which causes an infinite loop.

It looks like this functionality was introduced in this commit:
2e4f87b#diff-d1f9de41881a455d693a042b740981ff

Can anyone tell me why? Just out of curiosity. Currently this is breaking our unit tests if someone has Consul running on their local machine (though this is probably indicative of a larger architectural problem that I have yet to solve...) a quick fix would be to allow the listener to return an empty list.

Thanks!
Mike

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions