Reputation: 1046
In my flutter app I have an open stream that is listening to changes on a document on firestore. If I log the user out i receive the following exception:
[Firestore]: Listen for Query(THE_DOC_PATH) failed: Status{code=PERMISSION_DENIED, description=Missing or insufficient permissions., cause=null}
I/System.out( 6117): com.google.firebase.firestore.FirebaseFirestoreException: PERMISSION_DENIED: Missing or insufficient permissions.
I have a few questions
Thanks
Upvotes: 0
Views: 150
Reputation: 317760
Does the close the stream for me automatically?
Yes. After an error like this, there will be no more items emitted from the stream.
Are there any downsides to this happening? e.g. using extra reads on the doc or firestore rules
There are no extra costs, if that's what you're implying.
Should i manually be closing the stream before the user signs out?
Typically, yes. But that's a matter of opinion, and it's up to you.
Upvotes: 1