fix(firestore): address a missing branch in watch.stop() error remapping (#3643)
* fix(firestore): address a missing branch in watch.stop() error remapping
* fix(firestore): prefer not using else
diff --git a/firestore/watch.go b/firestore/watch.go
index 671ce9e..e4ac7fb 100644
--- a/firestore/watch.go
+++ b/firestore/watch.go
@@ -446,8 +446,11 @@
return
}
if err != nil {
+ // if an error occurs while closing the stream
s.err = err
+ return
}
+ // if we close successfully,
s.err = io.EOF // normal shutdown
}