meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.25k stars 2.48k forks source link

Notify subscriber condition checking #3100

Closed wan721 closed 2 years ago

wan721 commented 2 years ago

https://github.com/meetecho/janus-gateway/blob/ef984223dd0cfbaa07445c18748f506899678305/src/plugins/janus_videoroom.c#L8935

Hi, I'm just curious. In the second condition-checking, "or there's no room(anymore)" shouldn't it be room != NULL && g_atomic_int_get(&room->destroyed))

(no ! before g_atomic_int_get) ?

lminiero commented 2 years ago

This should actually probably be

room == NULL || g_atomic_int_get(&room->destroyed))

since also a NULL room property in the subscriber means the subscriber instance is not in the room anymore. I'll have another look later and commit a fix in case. Thanks for spotting this!

wan721 commented 2 years ago

I think room == NULL || g_atomic_int_get(&room->destroyed)) makes sense. Thank you Lorenzo.

lminiero commented 2 years ago

Apologies for the delay, I was abroad for a conference last week. I just pushed the fix.

wan721 commented 1 year ago

Apologies for the delay, I was abroad for a conference last week. I just pushed the fix.

Apologies for my delay as well. I almost forgot about it. Thank you Lorenzo.