From 84f8955a887232b6308d79c68b8db44f64df455c Mon Sep 17 00:00:00 2001 From: Andrew Bursavich Date: Mon, 11 Aug 2014 16:57:02 -0400 Subject: [PATCH] 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 --- context/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/context.go b/context/context.go index 554e14df..e3c5345d 100644 --- a/context/context.go +++ b/context/context.go @@ -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 }