minor fix

This commit is contained in:
Piyush मिश्रः 2021-02-22 11:37:50 +05:30
parent b5c0bd6740
commit 6017a45e35
2 changed files with 11 additions and 3 deletions

View File

@ -182,8 +182,8 @@ impl WsSansad {
// heartbeat timed out
// stop actor
futures::executor::block_on(act.leave_grih()); // notify leaving
ctx.stop();
// don't try to send a ping
return;
}
@ -202,6 +202,7 @@ impl WsSansad {
// heartbeat timed out
// stop actor
futures::executor::block_on(act.leave_grih()); // notify leaving
ctx.stop();
// don't try to send a ping

View File

@ -177,6 +177,9 @@ function connect(frm) {
$('#progressbar').removeClass('hidden');
var data = {};
frm.serializeArray().forEach(el => {
if(typeof el.value == 'string')
data[el.name] = el.value.trim();
else
data[el.name] = el.value;
});
if(data['length'] !== undefined) {
@ -222,7 +225,10 @@ function connect_next() {
socket.send(JSON.stringify({ cmd: 'randnext' }));
}
var leaving = false;
function leave() {
if(leaving) return;
leaving = true;
callbacks = [];
callbacks.push(() => {
$('#progressbar').addClass('hidden');
@ -234,6 +240,7 @@ function leave() {
myinfo.kunjika = '';
myinfo.name = '';
joining = false;
leaving = false;
});
socket.send(JSON.stringify({
cmd: 'leave'