Do not process events after participant close. (#1824)
* Do not process events after participant close. Avoid processing transport events after participant/transport close. It causes error logs which are not really errors, but distracting noise. * correct comment
This commit is contained in:
@@ -1370,6 +1370,11 @@ func (t *PCTransport) postEvent(event event) {
|
||||
|
||||
func (t *PCTransport) processEvents() {
|
||||
for event := range t.eventCh {
|
||||
if t.isClosed.Load() {
|
||||
// just drain the channel without processing events
|
||||
continue
|
||||
}
|
||||
|
||||
err := t.handleEvent(&event)
|
||||
if err != nil {
|
||||
t.params.Logger.Errorw("error handling event", err, "event", event.String())
|
||||
|
||||
Reference in New Issue
Block a user