Skip unregistered and closed upstream connections
This commit is contained in:
parent
636ede13da
commit
50fc19c92f
@ -43,7 +43,7 @@ type user struct {
|
|||||||
func (u *user) forEachUpstream(f func(uc *upstreamConn)) {
|
func (u *user) forEachUpstream(f func(uc *upstreamConn)) {
|
||||||
u.lock.Lock()
|
u.lock.Lock()
|
||||||
for _, uc := range u.upstreamConns {
|
for _, uc := range u.upstreamConns {
|
||||||
if !uc.registered {
|
if !uc.registered || uc.closed {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
f(uc)
|
f(uc)
|
||||||
|
Loading…
Reference in New Issue
Block a user