From 89ad55d72f79995a68f9c2ed1cd9b5ba50009d6d Mon Sep 17 00:00:00 2001 From: Christopher Wilcox Date: Mon, 1 Feb 2021 16:11:26 -0800 Subject: [PATCH] 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 --- firestore/watch.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firestore/watch.go b/firestore/watch.go index 671ce9e522a..e4ac7fb3ded 100644 --- a/firestore/watch.go +++ b/firestore/watch.go @@ -446,8 +446,11 @@ func (s *watchStream) stop() { 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 }