diff --git a/reflector/blocklist.go b/reflector/blocklist.go index 2e5f829..14e60c3 100644 --- a/reflector/blocklist.go +++ b/reflector/blocklist.go @@ -57,7 +57,12 @@ func blockedSdHashes() (map[string]valOrErr, error) { if err != nil { return nil, errors.Err(err) } - defer resp.Body.Close() + defer func() { + err := resp.Body.Close() + if err != nil { + log.Errorln(err) + } + }() var r struct { Success bool `json:"success"` diff --git a/wallet/network.go b/wallet/network.go index 32e514c..d98f4e6 100644 --- a/wallet/network.go +++ b/wallet/network.go @@ -179,13 +179,13 @@ func (n *Node) listen() { } // listenPush returns a channel of messages matching the method. -func (n *Node) listenPush(method string) <-chan []byte { - c := make(chan []byte, 1) - n.pushHandlersMu.Lock() - defer n.pushHandlersMu.Unlock() - n.pushHandlers[method] = append(n.pushHandlers[method], c) - return c -} +//func (n *Node) listenPush(method string) <-chan []byte { +// c := make(chan []byte, 1) +// n.pushHandlersMu.Lock() +// defer n.pushHandlersMu.Unlock() +// n.pushHandlers[method] = append(n.pushHandlers[method], c) +// return c +//} // request makes a request to the server and unmarshals the response into v. func (n *Node) request(method string, params []string, v interface{}) error {