Skip to content

Commit c969f23

Browse files
committed
Update event_manager.ts
1 parent c5c558d commit c969f23

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/firestore/src/core/event_manager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ export async function eventManagerListen(
145145
listenerAction = listener.listensToRemoteStore()
146146
? ListenerSetupAction.InitializeLocalListenAndRequireWatchConnection
147147
: ListenerSetupAction.InitializeLocalListenOnly;
148-
} else if (listener.listensToRemoteStore()) {
148+
} else if (
149+
!queryInfo.hasRemoteListeners() &&
150+
listener.listensToRemoteStore()
151+
) {
149152
// Query has been listening to local cache, and tries to add a new listener sourced from watch.
150153
listenerAction = ListenerSetupAction.RequireWatchConnectionOnly;
151154
}

0 commit comments

Comments
 (0)