refactor: Modular network manager

This commit is contained in:
世界 committed 2025-01-13 15:14:29 +08:00
1 parent 19fb214226
commit a1be455202
35 files changed
+612 -603

No files matched your search

+2 -2
View File
@@ -52,13 +52,13 @@ func (m *Manager) Start(stage adapter.StartStage) error {
func (m *Manager) Close() error {
m.access.Lock()
defer m.access.Unlock()
if !m.started {
panic("not started")
return nil
}
m.started = false
inbounds := m.inbounds
m.inbounds = nil
m.access.Unlock()
monitor := taskmonitor.New(m.logger, C.StopTimeout)
var err error
for _, inbound := range inbounds {