From 83fe6c1bab2485b54f4ec0ef29a7390c6c615438 Mon Sep 17 00:00:00 2001
From: cyBerta <cyberta@riseup.net>
Date: Sat, 22 Feb 2025 20:58:19 +0100
Subject: [PATCH] Take interrupt signal into account to stop command line
 client when setting up obfs4 connection

---
 client/client.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/client.go b/client/client.go
index 2f0d86f..900c752 100644
--- a/client/client.go
+++ b/client/client.go
@@ -236,7 +236,7 @@ func (c *Client) createObfs4Connection(obfs4Endpoint *Obfs4Config) (*Obfs4Conn,
 		return nil, err
 	}
 
-	ctx, cancel := context.WithTimeout(context.Background(), dialGiveUpTime)
+	ctx, cancel := context.WithTimeout(c.ctx, dialGiveUpTime)
 	defer cancel()
 
 	if c.kcpConfig.Enabled {
-- 
GitLab