mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
swarm/api, swarm/network: Delint + nil chan err in protocoltester
This commit is contained in:
parent
5f2378dfc5
commit
6e708b758a
2 changed files with 5 additions and 2 deletions
|
|
@ -422,7 +422,6 @@ func (s *Server) translateResourceError(w http.ResponseWriter, r *Request, supEr
|
|||
}
|
||||
|
||||
s.Error(w, r, defaultErr)
|
||||
return
|
||||
}
|
||||
|
||||
// HandleGet handles a GET request to
|
||||
|
|
|
|||
|
|
@ -82,7 +82,11 @@ func newBzzBaseTester(t *testing.T, n int, addr *BzzAddr, spec *protocols.Spec,
|
|||
cs := make(map[string]chan bool)
|
||||
|
||||
srv := func(p *bzzPeer) error {
|
||||
defer close(cs[p.ID().String()])
|
||||
defer func() {
|
||||
if cs[p.ID().String()] != nil {
|
||||
close(cs[p.ID().String()])
|
||||
}
|
||||
}()
|
||||
return run(p)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue