Fix panic when closing downstream connection
This commit is contained in:
parent
1f5a72a7cf
commit
9fea758956
@ -166,6 +166,7 @@ func (dc *downstreamConn) Close() error {
|
|||||||
for i := range u.downstreamConns {
|
for i := range u.downstreamConns {
|
||||||
if u.downstreamConns[i] == dc {
|
if u.downstreamConns[i] == dc {
|
||||||
u.downstreamConns = append(u.downstreamConns[:i], u.downstreamConns[i+1:]...)
|
u.downstreamConns = append(u.downstreamConns[:i], u.downstreamConns[i+1:]...)
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
u.lock.Unlock()
|
u.lock.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user