Skip to content

Commit ae07a5a

Browse files
committed
handle 502 replay download errors
1 parent 0cdbe71 commit ae07a5a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

scripts/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
#curl localhost:5600 --data-binary "@/datadrive/odota-parser/7355186741_1742953546.dem"
44
#curl localhost:5600 --data-binary "@/datadrive/odota-parser/6298221747_1156784242.dem"
55

6-
curl localhost:5600/blob?replay_url=http://replay223.valve.net/570/1416146420_785306176.dem.bz2
6+
curl localhost:5600/blob?replay_url=http://replay118.valve.net/570/8218938996_1424352668.dem.bz2

src/main/java/opendota/Main.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ public void handle(HttpExchange t) throws IOException {
9292
// Parse took too long, maybe China replay?
9393
status = 200;
9494
}
95+
if (error.toString().contains("curl: (22) The requested URL returned error: 502")) {
96+
// Google-Edge-Cache: origin retries exhausted Error: 2010
97+
// Server error, don't retry
98+
status = 200;
99+
}
95100
if (error.toString().contains("bunzip2: Data integrity error when decompressing")) {
96101
// Corrupted replay, don't retry
97102
status = 200;

0 commit comments

Comments
 (0)