mirror of https://github.com/PiyushXCoder/lupt.git
minor fix
This commit is contained in:
parent
b5c0bd6740
commit
6017a45e35
|
|
@ -182,8 +182,8 @@ impl WsSansad {
|
||||||
// heartbeat timed out
|
// heartbeat timed out
|
||||||
|
|
||||||
// stop actor
|
// stop actor
|
||||||
ctx.stop();
|
futures::executor::block_on(act.leave_grih()); // notify leaving
|
||||||
|
ctx.stop();
|
||||||
// don't try to send a ping
|
// don't try to send a ping
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -202,6 +202,7 @@ impl WsSansad {
|
||||||
// heartbeat timed out
|
// heartbeat timed out
|
||||||
|
|
||||||
// stop actor
|
// stop actor
|
||||||
|
futures::executor::block_on(act.leave_grih()); // notify leaving
|
||||||
ctx.stop();
|
ctx.stop();
|
||||||
|
|
||||||
// don't try to send a ping
|
// don't try to send a ping
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,10 @@ function connect(frm) {
|
||||||
$('#progressbar').removeClass('hidden');
|
$('#progressbar').removeClass('hidden');
|
||||||
var data = {};
|
var data = {};
|
||||||
frm.serializeArray().forEach(el => {
|
frm.serializeArray().forEach(el => {
|
||||||
data[el.name] = el.value;
|
if(typeof el.value == 'string')
|
||||||
|
data[el.name] = el.value.trim();
|
||||||
|
else
|
||||||
|
data[el.name] = el.value;
|
||||||
});
|
});
|
||||||
if(data['length'] !== undefined) {
|
if(data['length'] !== undefined) {
|
||||||
data['length'] = parseInt(data['length']);
|
data['length'] = parseInt(data['length']);
|
||||||
|
|
@ -222,7 +225,10 @@ function connect_next() {
|
||||||
socket.send(JSON.stringify({ cmd: 'randnext' }));
|
socket.send(JSON.stringify({ cmd: 'randnext' }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var leaving = false;
|
||||||
function leave() {
|
function leave() {
|
||||||
|
if(leaving) return;
|
||||||
|
leaving = true;
|
||||||
callbacks = [];
|
callbacks = [];
|
||||||
callbacks.push(() => {
|
callbacks.push(() => {
|
||||||
$('#progressbar').addClass('hidden');
|
$('#progressbar').addClass('hidden');
|
||||||
|
|
@ -234,6 +240,7 @@ function leave() {
|
||||||
myinfo.kunjika = '';
|
myinfo.kunjika = '';
|
||||||
myinfo.name = '';
|
myinfo.name = '';
|
||||||
joining = false;
|
joining = false;
|
||||||
|
leaving = false;
|
||||||
});
|
});
|
||||||
socket.send(JSON.stringify({
|
socket.send(JSON.stringify({
|
||||||
cmd: 'leave'
|
cmd: 'leave'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue