diff --git a/common/tls/time_wrapper.go b/common/tls/time_wrapper.go index 491fca98..5cbecedc 100644 --- a/common/tls/time_wrapper.go +++ b/common/tls/time_wrapper.go @@ -11,10 +11,13 @@ type TimeServiceWrapper struct { } func (w *TimeServiceWrapper) TimeFunc() func() time.Time { - if w.TimeService == nil { - return nil + return func() time.Time { + if w.TimeService != nil { + return w.TimeService.TimeFunc()() + } else { + return time.Now() + } } - return w.TimeService.TimeFunc() } func (w *TimeServiceWrapper) Upstream() any {