From 947492a71c80c9dccd9915b051612e32bdef980d Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Wed, 5 Apr 2017 11:02:49 +0200 Subject: [PATCH] close all sessions after main connection ends --- app/proxyman/mux/mux.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/proxyman/mux/mux.go b/app/proxyman/mux/mux.go index 23ac4707..d8fd9fac 100644 --- a/app/proxyman/mux/mux.go +++ b/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 {