From c345d4818efa763b07961d6c132afe1cf91845de Mon Sep 17 00:00:00 2001 From: Xray9 <79239158+Xray9@users.noreply.github.com> Date: Mon, 1 Mar 2021 15:26:53 +0800 Subject: [PATCH] Fix available mux picker in reverse portal (#274) --- app/reverse/portal.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/reverse/portal.go b/app/reverse/portal.go index 0b26f9c2..b0860a6e 100644 --- a/app/reverse/portal.go +++ b/app/reverse/portal.go @@ -157,6 +157,9 @@ func (p *StaticMuxPicker) PickAvailable() (*mux.ClientWorker, error) { if w.draining { continue } + if w.client.Closed() { + continue + } if w.client.ActiveConnections() < minConn { minConn = w.client.ActiveConnections() minIdx = i