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:
Raja Subramanian
2023-06-25 09:26:14 +05:30
committed by GitHub
parent 81f41aca20
commit 95f360bbce
2 changed files with 10 additions and 1 deletions
+5
View File
@@ -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())