Commit 84f8955a authored by Andrew Bursavich's avatar Andrew Bursavich Committed by Sameer Ajmani

context: make parentCancelCtx iterative

It seems like it was meant to be this way. There was already a for loop, but then it made a recursive call instead.

LGTM=sameer
R=golang-codereviews, sameer
CC=golang-codereviews
https://golang.org/cl/113540044
parent 9c40a72a
......@@ -254,7 +254,7 @@ func parentCancelCtx(parent Context) (*cancelCtx, bool) {
case *timerCtx:
return &c.cancelCtx, true
case *valueCtx:
return parentCancelCtx(c.Context)
parent = c.Context
default:
return nil, false
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment