Skip to content

Commit

Permalink
Merge pull request #51 from LeelaChessZero/master
Browse files Browse the repository at this point in the history
Prepare release v0.17.1
  • Loading branch information
borg323 authored Sep 1, 2018
2 parents 56b8edf + efad79b commit 78bbe2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lc0_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ func uploadGame(httpClient *http.Client, path string, pgn string,
continue
}
resp.Body.Close()
if resp.StatusCode != 200 && strings.Contains(body.String(), " upgrade " ) {
log.Fatal("The lc0 version you are using is not accepted by the server")
}
break
}

Expand Down
3 changes: 3 additions & 0 deletions src/client/client_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ func postParams(httpClient *http.Client, uri string, data map[string]string, tar
if target != nil {
err = json.Unmarshal(b, target)
if err != nil {
if strings.Contains(string(b), " upgrade ") {
log.Fatal("The client version you are using is not accepted by the server")
}
log.Printf("Bad JSON from %s -- %s\n", uri, string(b))
}
}
Expand Down

0 comments on commit 78bbe2b

Please sign in to comment.