lego icon indicating copy to clipboard operation
lego copied to clipboard

Use context.Context to enforce cancellation

Open mholt opened this issue 6 years ago • 3 comments

It would be useful, when shutting down a server or even the lego command, that Ctrl+C can cancel any active & pending challenges in a way that their resources get cleaned up when shutting down.

In other words, an API that exposes context.Context which can be used for cancellation would be helpful. What do you think?

mholt avatar Sep 17 '19 20:09 mholt

Implementing this in https://github.com/mholt/acme

mholt avatar May 01 '20 18:05 mholt

Just ran into this. Doing a certain amount of testing means if I CTRL+C while lego is waiting for record propagation, it does not clean up DNS records.

systemcrash avatar Mar 03 '23 14:03 systemcrash

And when doing DNS-01 it's not possible to gracefully stop application until timeout happens after 1 minute.

outofforest avatar Jun 21 '23 19:06 outofforest