Skip to content

Commit 66b7821

Browse files
committed
Fix timeout on version check for unsupported product
Requesting a version check for an unsupported product (like W3DM) would result in the server ignoring the request and timing out instead of returning a fail response.
1 parent 7d6bec6 commit 66b7821

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Hashing/HashMain.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ public static CheckrevisionResults getChecksum(int prod, String formula, int dll
100100

101101
public static CheckrevisionResults getRevision(int prod, String formula, String dll, byte platform, int ver){
102102
String[] files = null;
103+
if (prod < 0 || prod > Constants.prods.length) return null;
104+
103105
try{
104106
CRevChecks[prod-1]++;
105107
if (Constants.displayParseInfo) Out.info("HashMain", ">>> [" + Constants.prods[prod-1] + "] Version Check V"+ver);
@@ -159,7 +161,7 @@ public static CheckrevisionResults getRevision(int prod, String formula, String
159161
if(dll.matches("CheckRevision.mpq") == true) return getRevision(prod, formula, dll, Constants.PLATFORM_INTEL, 4);
160162
if(dll.matches("CheckRevisionD1.mpq") == true) return getRevision(prod, formula, dll, Constants.PLATFORM_INTEL, 4);
161163

162-
Out.info("CHSUM", "Unknown archive: " + dll + ", Filetime: 0x" + Long.toHexString(filetime));
164+
Out.info("HashMain", "Unknown archive: " + dll + ", Filetime: 0x" + Long.toHexString(filetime));
163165
return null;
164166
}
165167
}

0 commit comments

Comments
 (0)