return after writing header
This commit is contained in:
3
main.go
3
main.go
@@ -340,6 +340,7 @@ func getMatch(w http.ResponseWriter, r *http.Request) {
|
||||
if err != nil {
|
||||
log.Warningf("[GM] match %d not found: %+v", matchId, err)
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
mResponse := &MatchResponse{
|
||||
@@ -360,6 +361,8 @@ func getMatch(w http.ResponseWriter, r *http.Request) {
|
||||
db.Lock.RUnlock()
|
||||
if err != nil {
|
||||
log.Errorf("[GM] can't find stats for match %d: %v", tMatch.ID, err)
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
for _, iStats := range tStats {
|
||||
|
Reference in New Issue
Block a user