Skip to content

Commit

Permalink
fix: treat all status codes below 400 as correct
Browse files Browse the repository at this point in the history
MSE can return 304 etc.
  • Loading branch information
ianshade committed Apr 9, 2021
1 parent ab6c76b commit d0791b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/devices/vizMSE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,7 @@ class VizMSEManager extends EventEmitter {
private async _pingEngine (engine: Engine): Promise<EngineStatus> {
return new Promise((resolve, _reject) => {
request.get(`http://${engine.host}:${this.engineRestPort}/#/status`, { timeout: 2000 }, (error, response) => {
const alive = !error && response.statusCode === 200
const alive = !error && response.statusCode < 400
resolve({ ...engine, alive })
})
})
Expand Down

0 comments on commit d0791b1

Please sign in to comment.