mirror of https://github.com/minio/minio.git
avoid calling close for nil inbound/outblock channels
This commit is contained in:
parent
cff8235068
commit
9987ff570b
|
@ -325,9 +325,15 @@ func (m *muxServer) close() {
|
|||
m.cancel()
|
||||
m.recvMu.Lock()
|
||||
defer m.recvMu.Unlock()
|
||||
xioutil.SafeClose(m.inbound)
|
||||
m.inbound = nil
|
||||
|
||||
xioutil.SafeClose(m.outBlock)
|
||||
m.outBlock = nil
|
||||
if m.inbound != nil {
|
||||
xioutil.SafeClose(m.inbound)
|
||||
m.inbound = nil
|
||||
}
|
||||
|
||||
if m.outBlock != nil {
|
||||
xioutil.SafeClose(m.outBlock)
|
||||
m.outBlock = nil
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue