[PR #918] Fix lookupIPsResilient waiting forever after max retries #903

Open
opened 2025-11-20 04:26:29 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/qdm12/ddns-updater/pull/918
Author: @LucaScorpion
Created: 1/21/2025
Status: 🔄 Open

Base: masterHead: fix-lookup-ips-after-retries


📝 Commits (1)

  • f10b775 Fix 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 lookupIPsResilient func in internal/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 .idea folder 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.

## 📋 Pull Request Information **Original PR:** https://github.com/qdm12/ddns-updater/pull/918 **Author:** [@LucaScorpion](https://github.com/LucaScorpion) **Created:** 1/21/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `fix-lookup-ips-after-retries` --- ### 📝 Commits (1) - [`f10b775`](https://github.com/qdm12/ddns-updater/commit/f10b775eda646d41b786d3faead1ab343dd417c5) Fix lookupIPsResilient waiting forever after max retries ### 📊 Changes **2 files changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -1) 📝 `internal/update/service.go` (+1 -0) </details> ### 📄 Description In the `lookupIPsResilient` func in `internal/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 `.idea` folder to the `.gitignore`, since I work in Goland. Let me know if that's okay, or if I should remove that. Thanks in advance! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 04:26:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#903