Merge pull request #1451 from chaotixkilla/fix-send-only-server-version-old-poller
Only send the server version to the old poller requests by 8.1+ machines
This commit is contained in:
commit
f4fa98879f
1 changed files with 5 additions and 0 deletions
|
|
@ -81,6 +81,11 @@ function poll (req, res, next) {
|
|||
|
||||
state.pids = _.update(operatorId, _.set(deviceId, { pid, ts: Date.now() }), state.pids)
|
||||
|
||||
// BACKWARDS_COMPATIBILITY 8.1
|
||||
// Machines after 8.1 only need the server version from the initial polling request.
|
||||
if (semver.gte(machineVersion, '8.1.0-beta.0'))
|
||||
return res.json({ version })
|
||||
|
||||
return Promise.all([
|
||||
pi.recordPing(deviceTime, machineVersion, machineModel),
|
||||
pi.pollQueries(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue