Skip to content

Commit 380a850

Browse files
committed
lint: bootstrap.go
1 parent b1e1e64 commit 380a850

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

intra/bootstrap.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ func (b *bootstrap) kickstartLocked(px ipn.ProxyProvider) error {
232232
}
233233

234234
if prev := b.tr; prev != nil {
235-
go prev.Stop() // stop after new transport is ready
235+
go stopTransport(prev) // stop after new transport is ready
236236
log.I("dns: default: removing %s %s[%s]; using %s %s",
237237
b.typ, b.hostname, b.IPPorts(), typstr(tr), ippstr(tr))
238238
}
@@ -323,3 +323,9 @@ func ippstr(tr dnsx.Transport) string {
323323
}
324324
return fmt.Sprintf("%v", tr.IPPorts())
325325
}
326+
327+
func stopTransport(t dnsx.Transport) {
328+
if t != nil {
329+
_ = t.Stop()
330+
}
331+
}

0 commit comments

Comments
 (0)