Skip to content

Commit 9f924d6

Browse files
committed
DO not update perf session if the sessionID has not changed.
1 parent e683c1d commit 9f924d6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

firebase-perf/src/main/java/com/google/firebase/perf/session/SessionManager.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ public void stopGaugeCollectionIfSessionRunningTooLong() {
110110
* @see PerfSession#isVerbose()
111111
*/
112112
public void updatePerfSession(PerfSession perfSession) {
113+
// Do not update the perf session if it is the exact same sessionId.
114+
if (perfSession.sessionId() == this.perfSession.sessionId()) {
115+
return;
116+
}
117+
113118
this.perfSession = perfSession;
114119

115120
synchronized (clients) {

0 commit comments

Comments
 (0)