Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stopped timer can cause certificate to never update (#350)
Once the `time.NewTimer()` expires, calls to `timer.Stop()` will return `false`, but the channel will have nothing in it, causing `<-timer.C` to hang forever. This is hinted at by the docs, even though they suggest `timer.Stop()` should return true in that case. We change to a non-blocking drain so that we won't block forever. This manifests in never updating the certificate after it expires, causing TLS handshake errors. Fixes #275
- Loading branch information