mirror of https://github.com/sipwise/rtpengine.git
Due to multiple threads polling all sockets for read events, it's possible for one socket to receive a read event in one thread, then immediately receive another read event in another thread, resulting in two threads reading packets from the same socket at the same time. While this is perfectly valid and correctly handled by mutex etc, it can result in packets being processed out of order. In media passthrough scenarios which don't do sequencing this can result in packets being reordered. Using a simple atomic counter we can ensure that only one thread is reading from any one socket at a time. Relevant to #1638 Change-Id: I406491d6ae5e13e618e153ba5463fd9169636016pull/1665/head
parent
6f57d381e6
commit
fdc9b14509
Loading…
Reference in new issue