This commit is contained in:
zsfelfoldi
2015-04-06 08:01:36 +02:00
committed by zelig
parent e2d333d209
commit 94489b2269
4 changed files with 82 additions and 53 deletions

View File

@ -55,7 +55,11 @@ func (self *DocServer) RegisterProtocols(schemes map[string]func(*DocServer) htt
func (self *DocServer) GetAuthContent(uri string, hash common.Hash) (content []byte, err error) {
// retrieve content
resp, err := self.Client().Get(uri)
defer resp.Body.Close()
defer func() {
if resp != nil {
resp.Body.Close()
}
}()
if err != nil {
return
}