The documentation says that After an error, the listener will not receive any more events, and there is no need to detach your listener. But I don't want that behavior. Instead, I want the listener to be attached there itself, as in the future, there is still a chance of the listener getting permission to read from there.
Suppose if the rules say that, reading is allowed only if readField is true. Even if the current value of readField is false, it has a possibility of becoming true, so I want the listener to keep listening till I manually remove it when there is no need.