@@ -282,12 +282,9 @@ func NewConn(options *Options) (conn *Conn, err error) {
282
282
Logger (options .Logger .Named ("net.packet-filter" )),
283
283
))
284
284
285
- dialContext ,dialCancel := context .WithCancel (context .Background ())
286
285
server := & Conn {
287
286
blockEndpoints :options .BlockEndpoints ,
288
287
derpForceWebSockets :options .DERPForceWebSockets ,
289
- dialContext :dialContext ,
290
- dialCancel :dialCancel ,
291
288
closed :make (chan struct {}),
292
289
logger :options .Logger ,
293
290
magicConn :magicConn ,
@@ -392,8 +389,6 @@ func IPFromUUID(uid uuid.UUID) netip.Addr {
392
389
393
390
// Conn is an actively listening Wireguard connection.
394
391
type Conn struct {
395
- dialContext context.Context
396
- dialCancel context.CancelFunc
397
392
mutex sync.Mutex
398
393
closed chan struct {}
399
394
logger slog.Logger
@@ -789,7 +784,6 @@ func (c *Conn) Close() error {
789
784
790
785
_ = c .netStack .Close ()
791
786
c .logger .Debug (context .Background (),"closed netstack" )
792
- c .dialCancel ()
793
787
_ = c .wireguardMonitor .Close ()
794
788
_ = c .dialer .Close ()
795
789
// Stops internals, e.g. tunDevice, magicConn and dnsManager.