Skip unregistered and closed upstream connections

This commit is contained in:
Simon Ser 2020-02-07 11:58:50 +01:00
parent 636ede13da
commit 50fc19c92f
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ type user struct {
func (u *user) forEachUpstream(f func(uc *upstreamConn)) {
u.lock.Lock()
for _, uc := range u.upstreamConns {
if !uc.registered {
if !uc.registered || uc.closed {
continue
}
f(uc)