startVanillaServer: handle server timeout on head request
This commit is contained in:
parent
b930840bec
commit
6737ab09d0
1 changed files with 2 additions and 1 deletions
|
|
@ -57,7 +57,8 @@ async function download (os, version, path = 'bds-') {
|
|||
for (let i = 0; i < 8; i++) { // Check for the latest server build for version (major.minor.patch.BUILD)
|
||||
const u = url(os, `${verStr}.${String(i).padStart(2, '0')}`)
|
||||
debug('Opening', u, Date.now())
|
||||
const ret = await head(u)
|
||||
let ret
|
||||
try { ret = await head(u) } catch (e) { continue }
|
||||
if (ret.statusCode === 200) {
|
||||
found = u
|
||||
debug('Found server', ret.statusCode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue