File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/main/java/org/jitsi/jigasi Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1399,10 +1399,13 @@ private class ExpireMediaStream
13991399 */
14001400 private boolean totalStatsSent = false ;
14011401
1402+ private static final int CHECK_INTERVAL_MS = 2000 ;
1403+ private final long start = System .currentTimeMillis ();
1404+
14021405 public ExpireMediaStream (AudioMediaStreamImpl stream )
14031406 {
14041407 // we want to check every 2 seconds for the media state
1405- super (2000 , false );
1408+ super (CHECK_INTERVAL_MS , false );
14061409 this .stream = stream ;
14071410 }
14081411
@@ -1413,10 +1416,9 @@ public void run()
14131416
14141417 try
14151418 {
1416- long lastReceived = stream .getLastInputActivityTime ();
1419+ long lastReceived = Math . max ( stream .getLastInputActivityTime (), start );
14171420
1418- if (System .currentTimeMillis () - lastReceived
1419- > mediaDroppedThresholdMs )
1421+ if (System .currentTimeMillis () - lastReceived > mediaDroppedThresholdMs )
14201422 {
14211423 // we want to log only when we go from not-expired into
14221424 // expired state
You can’t perform that action at this time.
0 commit comments