diff --git a/services/hh/queue.go b/services/hh/queue.go index 6d0f8e8..77b88fe 100644 --- a/services/hh/queue.go +++ b/services/hh/queue.go @@ -745,6 +745,10 @@ func (l *segment) lastModified() (time.Time, error) { l.mu.RLock() defer l.mu.RUnlock() + if l.file == nil { + return time.Time{}, ErrNotOpen + } + stats, err := os.Stat(l.file.Name()) if err != nil { return time.Time{}, err