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
diff --git a/context/context.go b/context/context.go
index 554e14d..e3c5345 100644
--- a/context/context.go
+++ b/context/context.go
@@ -254,7 +254,7 @@
case *timerCtx:
return &c.cancelCtx, true
case *valueCtx:
- return parentCancelCtx(c.Context)
+ parent = c.Context
default:
return nil, false
}