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
There is a multiple problems with this method, which could be solved with one or more solutions, however everything stems from the fact that currently we're only checking for isJoined() which checks if user is in RTC session, however we don't check user membership - if he is still in matrix room. Therefore if matrix room membership is leave we can still call this method and it goes to the point where it makes an authorized http request to the matrix server to inform about a state change. The server responds with 403, since user is not in the room anymore, which would be absolutely fine. However there is a logic where on try/catch block if there is an error from this request- it retries after some delay - which in this situation causes an infinite error loop.
Possible fixes and improvements for this:
We should check user membership to make sure we're able to send the request to the matrix server before actually sending it.
In try/catch block if we want to keep the retry logic- check for the type of error, if it's an error that states that server is down - then it is very good idea to have this retry logic, however if it's something like 403 or 400 - it will never succeed with same data- right? Then why retry this non stop?
There is timeout logic for leaveRoomSession logic, which works fine if request just takes to long and doesn't error out, however if it goes into that catch retry logic- the timeout doesn't work anymore, and we still get into that infinite loop.
matrix-js-sdk version that I'm using is ^34.7.0
Let me know if there is something else you would like me to add to an issue and let me know which solution sounds the best, I might make a PR for it :)
The text was updated successfully, but these errors were encountered:
There is a multiple problems with this method, which could be solved with one or more solutions, however everything stems from the fact that currently we're only checking for
isJoined()
which checks if user is in RTC session, however we don't check user membership - if he is still in matrix room. Therefore if matrix room membership isleave
we can still call this method and it goes to the point where it makes an authorized http request to the matrix server to inform about a state change. The server responds with 403, since user is not in the room anymore, which would be absolutely fine. However there is a logic where on try/catch block if there is an error from this request- it retries after some delay - which in this situation causes an infinite error loop.Possible fixes and improvements for this:
leaveRoomSession
logic, which works fine if request just takes to long and doesn't error out, however if it goes into that catch retry logic- the timeout doesn't work anymore, and we still get into that infinite loop.matrix-js-sdk version that I'm using is
^34.7.0
Let me know if there is something else you would like me to add to an issue and let me know which solution sounds the best, I might make a PR for it :)
The text was updated successfully, but these errors were encountered: