coldfix/certbot-dns-netcup

Timeout connecting API backend

Closed this issue · 1 comments

I was trying this plugin today and had connection timeouts while connecting to the Netcup API backend. The server seems to be really slow. I am not sure if this is temporary issue but it might be a good idea to add a timeout parameter to the plugin.

I fixed this for me by adding a hard coded value of 30 seconds. The default from nc_dnsapi is 5 seconds.

def _get_netcup_client(self):
    credentials = self.credentials.conf
    return nc_dnsapi.Client(
        credentials('customer-id'),
        credentials('api-key'),
        credentials('api-password'), 30)

Thanks for you work on this plugin!

Thanks for the info! I didn't encounter timeout issues so far, so it might be a temporary issue. It might be better to have it as a parameter that can be changed by the user, but I have added your suggestion as is for now.