From 5c57cbaebce254770f3eb8560863c9dfa0937abb Mon Sep 17 00:00:00 2001 From: Balint Gabor Date: Tue, 6 Mar 2018 11:00:34 +0100 Subject: [PATCH] swarm/network/stream: Simplify code (#303) --- swarm/network/stream/messages.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/swarm/network/stream/messages.go b/swarm/network/stream/messages.go index 675a4a64d8..3b3de367f5 100644 --- a/swarm/network/stream/messages.go +++ b/swarm/network/stream/messages.go @@ -71,11 +71,7 @@ type RequestSubscriptionMsg struct { func (p *Peer) handleRequestSubscription(req *RequestSubscriptionMsg) (err error) { log.Debug(fmt.Sprintf("handleRequestSubscription: streamer %s to subscribe to %s with stream %s", p.streamer.addr.ID(), p.ID(), req.Stream)) - err = p.streamer.Subscribe(p.ID(), req.Stream, req.History, req.Priority) - if err != nil { - return err - } - return nil + return p.streamer.Subscribe(p.ID(), req.Stream, req.History, req.Priority) } func (p *Peer) handleSubscribeMsg(req *SubscribeMsg) (err error) {