fix: only send the server version when the old poller is triggered by an 8.1+ machine
This commit is contained in:
parent
3d8d0d4f9c
commit
f66d155f08
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)
|
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([
|
return Promise.all([
|
||||||
pi.recordPing(deviceTime, machineVersion, machineModel),
|
pi.recordPing(deviceTime, machineVersion, machineModel),
|
||||||
pi.pollQueries(),
|
pi.pollQueries(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue