Browse Source

close all sessions after main connection ends

Darien Raymond 8 năm trước cách đây
mục cha
commit
947492a71c
1 tập tin đã thay đổi với 9 bổ sung0 xóa
  1. 9 0
      app/proxyman/mux/mux.go

+ 9 - 0
app/proxyman/mux/mux.go

@@ -271,6 +271,15 @@ func (m *Client) fetchOutput() {
 			break
 		}
 	}
+
+	// Close all downlinks
+	m.access.RLock()
+	for _, s := range m.sessions {
+		s.closeUplink()
+		s.closeDownlink()
+		s.output.CloseError()
+	}
+	m.access.RUnlock()
 }
 
 type Server struct {