• Sergey Zagursky's avatar
    net: fix improper Context.Deadline usage in DialContext · 7719016e
    Sergey Zagursky authored
    The existing implementation is erroneously assume that having no
    deadline in context.Context means that time returned from Deadline
    method will have IsZero() == true. But technically speaking this is an
    invalid assumption. The context.Context interface specification doesn't
    specify what time should be returned from Deadline method when there is
    no deadline set. It only specifies that second result of Deadline should
    be false.
    
    Fixes #35594
    
    Change-Id: Ife00aad77ab3585e469f15017550ac6c0431b140
    Reviewed-on: https://go-review.googlesource.com/c/go/+/207297
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
    7719016e
dial_test.go 26.7 KB