"Active users browsing" floods on socket reconnect in any given topic


  • Plugin & Theme Dev

    Whenever someone gets disconnected from the server and you are in any given topic, the moment it reconnects everyone who was online immediately comes back online and while you're in that particular topic the "browsing" users gets flooded with all users who were disconnected.

    Lets say there were 100 users online and you restarted the server but there were only 5 people browsing that particular topic. Well, now you have 100 users that weren't browsing that topic now in it. It corrects itself on a hard-refresh though...

    Screen Shot 2014-05-25 at 2.39.38 PM.png


  • Admin

    Legit bug that we've not gotten around to fixing. It is due to the fact that when you reconnect, you automatically join the global "room", as does everybody else. You don't automatically join the topic_{tid} room again.

    So while normally, when you enter a topic, the browsing list comprises the users in the topic_{tid} room, when the server d/c's and reconnects, the browsing list re-updates but is showing the users in global, yourself included.


  • Plugin & Theme Dev

    @julian Is this already a GH issue? If so I couldn't find it.


  • Admin

    It's not on GitHub, no -- but a cursory check of the code shows that users do rejoin the room they left on socket reconnection. Perhaps @baris fixed it recently?


  • Admin

    Thanks @trevor your post helped me pinpoint the problem. Should be fixed now gh#1582


  • Plugin & Theme Dev

    @baris said:

    Thanks @trevor your post helped me pinpoint the problem. Should be fixed now gh#1582

    No prob. 👍


 


Star

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.