use a single, shared timestamps array between all pings
This commit is contained in:
@ -16,7 +16,7 @@ class ServerRegistration {
|
||||
|
||||
handlePing (timestamp, resp, err, version) {
|
||||
// Store into in-memory ping data
|
||||
this.addPing(timestamp, resp)
|
||||
this.addPing(resp)
|
||||
|
||||
// Only notify the frontend to append to the historical graph
|
||||
// if both the graphing behavior is enabled and the backend agrees
|
||||
@ -89,10 +89,8 @@ class ServerRegistration {
|
||||
return update
|
||||
}
|
||||
|
||||
addPing (timestamp, resp) {
|
||||
const ping = {
|
||||
timestamp: timestamp
|
||||
}
|
||||
addPing (resp) {
|
||||
const ping = {}
|
||||
|
||||
if (resp) {
|
||||
// Append a result object
|
||||
@ -127,7 +125,6 @@ class ServerRegistration {
|
||||
|
||||
const payload = {
|
||||
serverId: this.serverId,
|
||||
timestamp: lastPing.timestamp,
|
||||
versions: this.versions,
|
||||
recordData: this.recordData,
|
||||
favicon: this.lastFavicon
|
||||
@ -157,7 +154,6 @@ class ServerRegistration {
|
||||
|
||||
return [{
|
||||
serverId: this.serverId,
|
||||
timestamp: new Date().getTime(),
|
||||
error: {
|
||||
message: 'Waiting...',
|
||||
placeholder: true
|
||||
|
Reference in New Issue
Block a user