MT#55283 fix refcount release

Closes #2067

Change-Id: I9fa79d67f158a3b5e00cdc83a12c494a4459f8a9
(cherry picked from commit 14769ec05d)
rfuchs/2095
Richard Fuchs 1 month ago
parent 06a48a0e62
commit 73ead7a1d6

@ -3396,10 +3396,8 @@ static void del_stream(struct re_stream *stream, struct rtpengine_table *table)
* they're closed. There can be no new open file references as the stream is set
* to eof. */
DBG("del_stream() waiting for other refs\n");
while (atomic_read(&stream->refcnt) != 2) {
if (wait_event_interruptible_timeout(stream->close_wq, atomic_read(&stream->refcnt) == 2, HZ / 10) == 0)
break;
}
while (atomic_read(&stream->refcnt) != 2)
wait_event_interruptible_timeout(stream->close_wq, atomic_read(&stream->refcnt) == 2, HZ / 10);
DBG("clearing stream's stream_idx entry\n");
_w_lock(&streams.lock, flags);

Loading…
Cancel
Save