[jitsi-dev] [jitsi-videobridge] Removes an unnecessary lock acquisition in order to prevent a deadlock (#119)


#1

reported by Swapnil Bagadia (and reduce the risk of deadlocks in
general).
You can view, comment on, or merge this pull request online at:

  https://github.com/jitsi/jitsi-videobridge/pull/119

-- Commit Summary --

  * Removes an unnecessary lock acquisition in order to prevent a deadlock

-- File Changes --

    M src/main/java/org/jitsi/videobridge/TransportManager.java (5)

-- Patch Links --

https://github.com/jitsi/jitsi-videobridge/pull/119.patch
https://github.com/jitsi/jitsi-videobridge/pull/119.diff

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/119


#2

Well... I agree that the original code before the modification wasn't good at protecting the TransportManager.channels List and, consequently, removing the synchronized block shouldn't make a (theoretically) bad situation worse. I'd rather we at least fix the (theoretically) possible ConcurrentModificationException (which I've fixed locally and I'm currently testing) in addition to fixing the deadlock. Anyway, @bgrozev, please feel free to merge your pull request.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/119#issuecomment-168772991


#3

This looks fairly innocent to me as well, especially given that protecting the list is broken anyway.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/119#issuecomment-168787435


#4

Closed #119.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/119#event-506964853