mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
swarm/api, swarm/network: Delint + nil chan err in protocoltester
This commit is contained in:
parent
d4b8e31d13
commit
a422d195bc
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)
|
s.Error(w, r, defaultErr)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleGet handles a GET request to
|
// 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)
|
cs := make(map[string]chan bool)
|
||||||
|
|
||||||
srv := func(p *bzzPeer) error {
|
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)
|
return run(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue