Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit58873fa

Browse files
authored
chore: remove unused context/cancel in tailnet Conn (#11399)
Spotted during code read; unused fields
1 parent64638b3 commit58873fa

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

‎tailnet/conn.go‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,9 @@ func NewConn(options *Options) (conn *Conn, err error) {
282282
Logger(options.Logger.Named("net.packet-filter")),
283283
))
284284

285-
dialContext,dialCancel:=context.WithCancel(context.Background())
286285
server:=&Conn{
287286
blockEndpoints:options.BlockEndpoints,
288287
derpForceWebSockets:options.DERPForceWebSockets,
289-
dialContext:dialContext,
290-
dialCancel:dialCancel,
291288
closed:make(chanstruct{}),
292289
logger:options.Logger,
293290
magicConn:magicConn,
@@ -392,8 +389,6 @@ func IPFromUUID(uid uuid.UUID) netip.Addr {
392389

393390
// Conn is an actively listening Wireguard connection.
394391
typeConnstruct {
395-
dialContext context.Context
396-
dialCancel context.CancelFunc
397392
mutex sync.Mutex
398393
closedchanstruct{}
399394
logger slog.Logger
@@ -789,7 +784,6 @@ func (c *Conn) Close() error {
789784

790785
_=c.netStack.Close()
791786
c.logger.Debug(context.Background(),"closed netstack")
792-
c.dialCancel()
793787
_=c.wireguardMonitor.Close()
794788
_=c.dialer.Close()
795789
// Stops internals, e.g. tunDevice, magicConn and dnsManager.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp