mirror of https://github.com/milvus-io/milvus.git
Fix rootcoord goroutine leak (#16071)
issue: #15658 Signed-off-by: sunby <bingyi.sun@zilliz.com> Co-authored-by: sunby <bingyi.sun@zilliz.com>pull/16080/head
parent
2047209d9e
commit
256ccb8f65
|
@ -186,9 +186,6 @@ func (ms *mqMsgStream) Start() {
|
|||
}
|
||||
|
||||
func (ms *mqMsgStream) Close() {
|
||||
if !atomic.CompareAndSwapInt32(&ms.closed, 0, 1) {
|
||||
return
|
||||
}
|
||||
ms.streamCancel()
|
||||
ms.wait.Wait()
|
||||
|
||||
|
@ -204,6 +201,10 @@ func (ms *mqMsgStream) Close() {
|
|||
}
|
||||
|
||||
ms.client.Close()
|
||||
|
||||
if !atomic.CompareAndSwapInt32(&ms.closed, 0, 1) {
|
||||
return
|
||||
}
|
||||
close(ms.receiveBuf)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue