Browse Source

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).
pull/120/head
Joachim Bauch 2 weeks ago
parent
commit
3f19882612
No known key found for this signature in database GPG Key ID: 77C1D22D53E15F02
  1. 1
      room.go

1
room.go

@ -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
}

Loading…
Cancel
Save