Added back join retry as fallback (#2095)

This commit is contained in:
Ahmad Farhat 2020-09-17 14:19:18 -04:00 committed by GitHub
parent a8251338af
commit 7309ef9bfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -51,8 +51,12 @@ $(document).on("turbolinks:load", function(){
var join_attempts = 0;
var request_to_join_meeting = function(){
$.post(window.location.pathname, { join_name: $(".background").attr("join-name") })
function request_to_join_meeting() {
$.post(window.location.pathname, { join_name: $(".background").attr("join-name") }, function() {
//Successful post - set up retry incase
if(join_attempts < 4){ setTimeout(request_to_join_meeting, 10000); }
join_attempts++;
})
}
// Refresh the page after 2 mins and attempt to reconnect to ActionCable