Hi all, joined the ranks of RoR a few days ago and have been working on getting my addons set up when I came across this solution to avoid GES turning itself off.
First of all thanks, this is great, I just wanted add something: the best way of implementing this temporary fix (especially considering some people mentioned concerns about performance issues) would actually be to disable line 55, since that is the only place where the function is called:
change
Ges.CommsJoinChannel()
to
--Ges.CommsJoinChannel()
If you do this you don't need to change any other lines in the file.
I did not take the time to work through all the code but generally speaking it is always better to disable a function call than to disable part of the function itself, because this way you make sure no unnecessary code is being executed.
In this case:
Addon tries to join a new channel because no existing channel was found. In order to prevent infinite attempts of joining a channel, the addon will stop after failing 5 times.
First fix: remove code that shuts down after 5 failed attempts. Result: addon does not shut down but now infinitely tries to join channel, not so good.
Second fix: remove the whole function. Result: every time addon tries to execute the function, an error happens (since the function can't be found), still not ideal.
Third fix: remove function call. Result: if addon can't find existing channel, nothing happens.
It's probably possible to disable more, but this seems good enough to me.
Many thanks to Luth for taking the time to come up with a fix in the first place, I only wanted to suggest a cleaner way
Send me a PM if something is unclear or if it doesn't work.