No need to close NATS receiver channel.

Will be garbage collected once the room is removed and is not needed to
wakeup the reader (which is terminated in a "select" loop from the close
channel).
This commit is contained in:
Joachim Bauch 2021-06-07 10:29:50 +02:00
parent 2f4414561e
commit 3f19882612
No known key found for this signature in database
GPG Key ID: 77C1D22D53E15F02
1 changed files with 0 additions and 1 deletions

View File

@ -180,7 +180,6 @@ func (r *Room) unsubscribeBackend() {
if err := subscription.Unsubscribe(); err != nil {
log.Printf("Error closing backend subscription for room %s: %s", r.Id(), err)
}
close(r.natsReceiver)
}(r.backendSubscription)
r.backendSubscription = nil
}