mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-16 07:57:30 +00:00
safesocket: add ConnectContext
This adds a variant for Connect that takes in a context.Context which allows passing through cancellation etc by the caller. Updates tailscale/corp#18266 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@@ -1497,7 +1497,7 @@ func (n *testNode) Ping(otherNode *testNode) error {
|
||||
func (n *testNode) AwaitListening() {
|
||||
t := n.env.t
|
||||
if err := tstest.WaitFor(20*time.Second, func() (err error) {
|
||||
c, err := safesocket.Connect(n.sockFile)
|
||||
c, err := safesocket.ConnectContext(context.Background(), n.sockFile)
|
||||
if err == nil {
|
||||
c.Close()
|
||||
}
|
||||
|
Reference in New Issue
Block a user