Skip to content

Commit

Permalink
Check for nil filter
Browse files Browse the repository at this point in the history
  • Loading branch information
mgdigital committed Mar 2, 2025
1 parent 7471f9e commit 38c050f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/blocking/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type manager struct {
func (m *manager) Filter(ctx context.Context, hashes []protocol.ID) ([]protocol.ID, error) {
m.mutex.Lock()
defer m.mutex.Unlock()
if m.lastFlushedAt.IsZero() || m.shouldFlush() {
if m.filter == nil || m.shouldFlush() {
if flushErr := m.flush(ctx); flushErr != nil {
return nil, flushErr
}
Expand Down

0 comments on commit 38c050f

Please sign in to comment.