set nil to ch
This commit is contained in:
@@ -110,6 +110,7 @@ func (oss *OpensearchStorage) QueryEvents(ctx context.Context, filter nostr.Filt
|
|||||||
ch <- evt
|
ch <- evt
|
||||||
}
|
}
|
||||||
close(ch)
|
close(ch)
|
||||||
|
ch = nil
|
||||||
} else {
|
} else {
|
||||||
return nil, fmt.Errorf("error getting by id: %w", err)
|
return nil, fmt.Errorf("error getting by id: %w", err)
|
||||||
}
|
}
|
||||||
@@ -152,7 +153,9 @@ func (oss *OpensearchStorage) QueryEvents(ctx context.Context, filter nostr.Filt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ch != nil {
|
||||||
close(ch)
|
close(ch)
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
return ch, nil
|
return ch, nil
|
||||||
|
|||||||
Reference in New Issue
Block a user