Fix bug in autoconnect check.

This commit is contained in:
Daniel Scalzi 2020-06-29 10:31:05 -04:00
parent f795b28d23
commit bec1385c55
No known key found for this signature in database
GPG Key ID: D18EA3FB4B142A57
2 changed files with 3 additions and 3 deletions

View File

@ -196,10 +196,8 @@ class Util {
static isAutoconnectBroken(forgeVersion) { static isAutoconnectBroken(forgeVersion) {
const forgeVer = forgeVersion.split('-')[1]
const minWorking = [31, 2, 15] const minWorking = [31, 2, 15]
const verSplit = forgeVer.split('.').map(v => Number(v)) const verSplit = forgeVersion.split('.').map(v => Number(v))
if(verSplit[0] === 31) { if(verSplit[0] === 31) {
for(let i=0; i<minWorking.length; i++) { for(let i=0; i<minWorking.length; i++) {

View File

@ -478,7 +478,9 @@ class ProcessBuilder {
try { try {
isAutoconnectBroken = Util.isAutoconnectBroken(this.forgeData.id.split('-')[2]) isAutoconnectBroken = Util.isAutoconnectBroken(this.forgeData.id.split('-')[2])
} catch(err) { } catch(err) {
logger.error(err)
logger.error('Forge version format changed.. assuming autoconnect works.') logger.error('Forge version format changed.. assuming autoconnect works.')
logger.debug('Forge version:', this.forgeData.id)
} }
if(isAutoconnectBroken) { if(isAutoconnectBroken) {