Skip to content

Commit

Permalink
fix(watch): make channnel that DB.Watch returns is readonly (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
246859 committed Nov 28, 2023
1 parent a046b40 commit 1494aac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ func (db *DB) Persist(key []byte) error {
return batch.Commit()
}

func (db *DB) Watch() (chan *Event, error) {
func (db *DB) Watch() (<-chan *Event, error) {
if db.options.WatchQueueSize <= 0 {
return nil, ErrWatchDisabled
}
Expand Down

0 comments on commit 1494aac

Please sign in to comment.