Skip to content

Commit

Permalink
Squash: Rename config option.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanLennox committed Jan 24, 2024
1 parent 2faac19 commit d3c05bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package org.jitsi.videobridge.websocket;

import org.eclipse.jetty.websocket.api.*;
import org.jitsi.utils.collections.*;
import org.jitsi.utils.logging2.*;
import org.jitsi.videobridge.*;
import org.jitsi.videobridge.util.*;
Expand Down Expand Up @@ -91,8 +90,8 @@ public void onWebSocketConnect(Session sess)
if (WebsocketServiceConfig.config.getSendKeepalivePings())
{
pinger = TaskPools.SCHEDULED_POOL.scheduleAtFixedRate(this::maybeSendPing,
WebsocketServiceConfig.config.getKeepalivePingTimeout().toMillis(),
WebsocketServiceConfig.config.getKeepalivePingTimeout().toMillis(),
WebsocketServiceConfig.config.getKeepalivePingInterval().toMillis(),
WebsocketServiceConfig.config.getKeepalivePingInterval().toMillis(),
TimeUnit.MILLISECONDS);
}

Expand Down Expand Up @@ -137,7 +136,7 @@ private void maybeSendPing()
synchronized (this)
{
if (Duration.between(lastSendTime, now).
compareTo(WebsocketServiceConfig.config.getKeepalivePingTimeout()) < 0)
compareTo(WebsocketServiceConfig.config.getKeepalivePingInterval()) < 0)
{
RemoteEndpoint remote = getRemote();
if (remote != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ class WebsocketServiceConfig private constructor() {
}

/** The time interval for keepalive pings */
val keepalivePingTimeout: Duration by config {
"videobridge.websockets.keepalive-ping-timeout".from(JitsiConfig.newConfig)
val keepalivePingInterval: Duration by config {
"videobridge.websockets.keepalive-ping-interval".from(JitsiConfig.newConfig)
}

/** The time interval for websocket timeouts */
Expand Down
4 changes: 2 additions & 2 deletions jvb/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ videobridge {
enable-compression = true
// Whether to send keepalive pings on idle websockets
send-keepalive-pings = true
// The keepalive ping timeout
keepalive-ping-timeout = 15 seconds
// The keepalive ping interval
keepalive-ping-interval = 15 seconds
// The websocket idle timeout
idle-timeout = 60 seconds

Expand Down

0 comments on commit d3c05bb

Please sign in to comment.