mirror of
https://github.com/golang/net.git
synced 2026-04-01 02:47:08 +09:00
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
This commit is contained in:
committed by
Sameer Ajmani
parent
9c40a72a07
commit
84f8955a88
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user