diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/initializers/constants.ts | 2 | ||||
-rw-r--r-- | server/lib/views/shared/video-viewer-counters.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index cd2cc33d3..9201f95b3 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -370,7 +370,7 @@ const CONSTRAINTS_FIELDS = { | |||
370 | 370 | ||
371 | const VIEW_LIFETIME = { | 371 | const VIEW_LIFETIME = { |
372 | VIEW: CONFIG.VIEWS.VIDEOS.IP_VIEW_EXPIRATION, | 372 | VIEW: CONFIG.VIEWS.VIDEOS.IP_VIEW_EXPIRATION, |
373 | VIEWER_COUNTER: 60000 * 1, // 1 minute | 373 | VIEWER_COUNTER: 60000 * 2, // 2 minutes |
374 | VIEWER_STATS: 60000 * 60 // 1 hour | 374 | VIEWER_STATS: 60000 * 60 // 1 hour |
375 | } | 375 | } |
376 | 376 | ||
diff --git a/server/lib/views/shared/video-viewer-counters.ts b/server/lib/views/shared/video-viewer-counters.ts index 999ab7d8d..5158f8f93 100644 --- a/server/lib/views/shared/video-viewer-counters.ts +++ b/server/lib/views/shared/video-viewer-counters.ts | |||
@@ -165,7 +165,7 @@ export class VideoViewerCounters { | |||
165 | private async federateViewerIfNeeded (video: MVideo, viewer: Viewer) { | 165 | private async federateViewerIfNeeded (video: MVideo, viewer: Viewer) { |
166 | // Federate the viewer if it's been a "long" time we did not | 166 | // Federate the viewer if it's been a "long" time we did not |
167 | const now = new Date().getTime() | 167 | const now = new Date().getTime() |
168 | const federationLimit = now - (VIEW_LIFETIME.VIEWER_COUNTER / 2) | 168 | const federationLimit = now - (VIEW_LIFETIME.VIEWER_COUNTER * 0.75) |
169 | 169 | ||
170 | if (viewer.lastFederation && viewer.lastFederation > federationLimit) return | 170 | if (viewer.lastFederation && viewer.lastFederation > federationLimit) return |
171 | 171 | ||