mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-11 22:30:47 +01:00
small changes
This commit is contained in:
@@ -155,11 +155,11 @@ func (p *Provider) ScheduleRenewal() {
|
||||
go func() {
|
||||
task := task.GlobalTask("cert renew scheduler")
|
||||
defer task.Finish("cert renew scheduler stopped")
|
||||
|
||||
|
||||
for {
|
||||
renewalTime := p.ShouldRenewOn()
|
||||
timer := time.NewTimer(time.Until(renewalTime))
|
||||
|
||||
|
||||
select {
|
||||
case <-task.Context().Done():
|
||||
timer.Stop()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
@@ -40,5 +41,5 @@ func (cidr *CIDR) String() string {
|
||||
}
|
||||
|
||||
func (cidr *CIDR) Equals(other *CIDR) bool {
|
||||
return (*net.IPNet)(cidr).IP.Equal(other.IP) && cidr.Mask.String() == other.Mask.String()
|
||||
return (*net.IPNet)(cidr).IP.Equal(other.IP) && bytes.Equal(cidr.Mask, other.Mask)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user