consider client age in commpatibility check

This commit is contained in:
Christian Grothoff 2017-07-01 14:06:39 +02:00
parent fc02e229d9
commit 76d2def563
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -49,7 +49,7 @@ export function compare(me: string, other: string): VersionMatchResult|undefined
return undefined;
}
const compatible = (meVer.current <= otherVer.current &&
const compatible = (meVer.current - meVer.age <= otherVer.current &&
meVer.current >= (otherVer.current - otherVer.age));
const currentCmp = Math.sign(meVer.current - otherVer.current);