Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
Reading the whole body before closing is no longer necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
folbrich committed Mar 8, 2017
1 parent e800f3b commit 807bcd9
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions api/internal/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package service
import (
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"os"
Expand Down Expand Up @@ -141,7 +139,6 @@ func (s *Service) checkStatus() bool {
return false
}
defer response.Body.Close()
io.Copy(ioutil.Discard, response.Body)
if response.StatusCode == 200 {
return true
}
Expand Down

0 comments on commit 807bcd9

Please sign in to comment.