(fn func())
| 1707 | } |
| 1708 | |
| 1709 | func (a *agent) trackGoroutine(fn func()) error { |
| 1710 | a.closeMutex.Lock() |
| 1711 | defer a.closeMutex.Unlock() |
| 1712 | if a.closing { |
| 1713 | return xerrors.Errorf("track conn goroutine: %w", ErrAgentClosing) |
| 1714 | } |
| 1715 | a.closeWaitGroup.Add(1) |
| 1716 | go func() { |
| 1717 | defer a.closeWaitGroup.Done() |
| 1718 | fn() |
| 1719 | }() |
| 1720 | return nil |
| 1721 | } |
| 1722 | |
| 1723 | func (a *agent) createTailnet( |
| 1724 | ctx context.Context, |
no test coverage detected