Skip to content

Commit

Permalink
swarm/network/stream: Simplify code (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbalint authored Mar 6, 2018
1 parent cdca257 commit 5c57cba
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions swarm/network/stream/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5c57cba

Please sign in to comment.