You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behaviour
The timers are set up as :timer.send_after in channels/room. The problem is that if the first user joins the room and leaves it, the timer gets cancelled.
Expected behaviour
The timers shouldn't depend on people joining or leaving the room (apart from the case when the room is closed).
The timers could be implemented using quantum, but I guess it would end up being really hacky.
Instead I think we may just introduce a GenServer that will be called whenever a question is changed (we could also transform QuestionChronicle to be sort of RoomStateGuard), which would invoke the broadcast/3 function and the sockets would handle it accordingly.
I think it would actually be a good idea architecture-wise - making the whole game operate in socket area only does not seem to be very stable.
Motivation / use case
Unbugging
The text was updated successfully, but these errors were encountered:
Type
Bug
Current behaviour
The timers are set up as
:timer.send_after
inchannels/room
. The problem is that if the first user joins the room and leaves it, the timer gets cancelled.Expected behaviour
The timers shouldn't depend on people joining or leaving the room (apart from the case when the room is closed).
The timers could be implemented using quantum, but I guess it would end up being really hacky.
Instead I think we may just introduce a GenServer that will be called whenever a question is changed (we could also transform QuestionChronicle to be sort of
RoomStateGuard
), which would invoke the broadcast/3 function and the sockets would handle it accordingly.I think it would actually be a good idea architecture-wise - making the whole game operate in socket area only does not seem to be very stable.
Motivation / use case
Unbugging
The text was updated successfully, but these errors were encountered: