Skip to content

Commit

Permalink
docs(firestore): note edge case for iterator.Done
Browse files Browse the repository at this point in the history
It's been reported that QuerySnapshotIterator may return
iterator.Done before Stop, possibly due to EOF caused by
networking issues. Add a caveat about this to the docs.

Updates googleapis#2601
  • Loading branch information
tritone committed Jul 29, 2020
1 parent 9012612 commit 78d9ed8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion firestore/query.go
Expand Up @@ -773,7 +773,8 @@ type QuerySnapshotIterator struct {
// Next blocks until the query's results change, then returns a QuerySnapshot for
// the current results.
//
// Next never returns iterator.Done unless it is called after Stop.
// Next is not expected to return iterator.Done unless it is called after Stop.
// Rarely, networking issues may also cause iterator.Done to be returned.
func (it *QuerySnapshotIterator) Next() (*QuerySnapshot, error) {
if it.err != nil {
return nil, it.err
Expand Down

0 comments on commit 78d9ed8

Please sign in to comment.