mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-08-02 18:48:49 -04:00
[PR #918] Fix lookupIPsResilient waiting forever after max retries #903
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/qdm12/ddns-updater/pull/918
Author: @LucaScorpion
Created: 1/21/2025
Status: 🔄 Open
Base:
master← Head:fix-lookup-ips-after-retries📝 Commits (1)
f10b775Fix lookupIPsResilient waiting forever after max retries📊 Changes
2 files changed (+3 additions, -1 deletions)
View changed files
📝
.gitignore(+2 -1)📝
internal/update/service.go(+1 -0)📄 Description
In the
lookupIPsResilientfunc ininternal/update/service.go, the goroutine will not send any result back if the maximum retries are exceeded with an error other than "no such host". This causes the lookup to wait forever, in turn preventing updates from happening.I ran into this while trying to add a new provider, I noticed that the update wasn't being triggered because the code seemed to be waiting forever. As it turns out, the ipv6 lookup returned an error like "no suitable address found", which cause it to retry a couple of times and eventually return without sending a result to the channel.
Unrelated change: I added the
.ideafolder to the.gitignore, since I work in Goland. Let me know if that's okay, or if I should remove that.Thanks in advance!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.