Skip to content

Commit

Permalink
fast path (Avoid defer) in normal msg.Fin case
Browse files Browse the repository at this point in the history
  • Loading branch information
jehiah committed Mar 26, 2015
1 parent 7fbbc6f commit a44589f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -756,10 +756,11 @@ func (r *Consumer) startStopContinueBackoff(conn *Conn, signal backoffSignal) {
// max backoff/normal rate (by ensuring that we dont continually incr/decr
// the counter during a backoff period)
r.backoffMtx.Lock()
defer r.backoffMtx.Unlock()
if r.inBackoffTimeout() {
r.backoffMtx.Unlock()
return
}
defer r.backoffMtx.Unlock()

// update backoff state
backoffUpdated := false
Expand Down

0 comments on commit a44589f

Please sign in to comment.