mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-13 09:50:00 +08:00
fix memory leak of grpc resolver (#4490)
Co-authored-by: nk <kui.niu@akuvox.com>
This commit is contained in:
@@ -38,7 +38,7 @@ func (b *discovBuilder) Build(target resolver.Target, cc resolver.ClientConn, _
|
||||
sub.AddListener(update)
|
||||
update()
|
||||
|
||||
return &nopResolver{cc: cc}, nil
|
||||
return &nopResolver{cc: cc, closeFunc: func() { sub.Close() }}, nil
|
||||
}
|
||||
|
||||
func (b *discovBuilder) Scheme() string {
|
||||
|
||||
Reference in New Issue
Block a user