Skip to content

Commit 3351744

Browse files
Fix SyncPlay ping never being reported to the server (#8201)
1 parent 7e22e4f commit 3351744

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/plugins/syncPlay/core/Manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Manager {
6161

6262
Events.on(this.timeSyncCore, 'time-sync-server-update', (event, timeOffset, ping) => {
6363
// Report ping back to server.
64-
if (this.syncEnabled) {
64+
if (this.isSyncPlayEnabled()) {
6565
this.getApiClient().sendSyncPlayPing({
6666
Ping: ping
6767
});

src/plugins/syncPlay/core/timeSync/TimeSync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Measurement {
4949
* Get ping time, in milliseconds.
5050
*/
5151
getPing() {
52-
return this.getDelay() / 2;
52+
return Math.round(this.getDelay() / 2);
5353
}
5454
}
5555

0 commit comments

Comments
 (0)