fix close on nil sink (#344)
This commit is contained in:
@@ -464,7 +464,9 @@ func (p *ParticipantImpl) Close(sendLeave bool) error {
|
|||||||
|
|
||||||
// ensure this is synchronized
|
// ensure this is synchronized
|
||||||
p.lock.RLock()
|
p.lock.RLock()
|
||||||
p.params.Sink.Close()
|
if p.params.Sink != nil {
|
||||||
|
p.params.Sink.Close()
|
||||||
|
}
|
||||||
onClose := p.onClose
|
onClose := p.onClose
|
||||||
p.lock.RUnlock()
|
p.lock.RUnlock()
|
||||||
if onClose != nil {
|
if onClose != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user