TimothyYe / godns

A dynamic DNS client tool that supports AliDNS, Cloudflare, Google Domains, DNSPod, HE.net & DuckDNS & DreamHost, etc, written in Go.
https://timothyye.github.io/godns/
Apache License 2.0
1.5k stars 220 forks source link

fix(run_once): in case of error, exit with code 1 #184

Closed curzolapierre closed 2 years ago

curzolapierre commented 2 years ago

Hello :wave: In this PR I suggest to add an error to run_once, the idea is to know if godns exited correctly or not. In addition, when an error occurred the godns command does not "freeze".

So it requires a little change on the handler.LoopUpdateIP signature.


I made this change on my fork about a month ago it met my need, I thought it might help others here. EDIT: I've updated the code to fit the current change

TimothyYe commented 2 years ago

Thanks for the contribution!