mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'xMAC94x/login_quickfix' into 'master'
Drop is run only AFTER each statement. See merge request veloren/veloren!1557
This commit is contained in:
commit
42201e6a2a
@ -270,7 +270,9 @@ impl Scheduler {
|
|||||||
// 3. Participant will try to access the BParticipant senders and receivers with
|
// 3. Participant will try to access the BParticipant senders and receivers with
|
||||||
// their next api action, it will fail and be closed then.
|
// their next api action, it will fail and be closed then.
|
||||||
trace!(?pid, "Got request to close participant");
|
trace!(?pid, "Got request to close participant");
|
||||||
if let Some(mut pi) = self.participants.lock().await.remove(&pid) {
|
let pi = self.participants.lock().await.remove(&pid);
|
||||||
|
trace!(?pid, "dropped participants lock");
|
||||||
|
if let Some(mut pi) = pi {
|
||||||
let (finished_sender, finished_receiver) = oneshot::channel();
|
let (finished_sender, finished_receiver) = oneshot::channel();
|
||||||
pi.s2b_shutdown_bparticipant_s
|
pi.s2b_shutdown_bparticipant_s
|
||||||
.take()
|
.take()
|
||||||
@ -278,8 +280,9 @@ impl Scheduler {
|
|||||||
.send(finished_sender)
|
.send(finished_sender)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
drop(pi);
|
drop(pi);
|
||||||
trace!("dropped bparticipant, waiting for finish");
|
trace!(?pid, "dropped bparticipant, waiting for finish");
|
||||||
let e = finished_receiver.await.unwrap();
|
let e = finished_receiver.await.unwrap();
|
||||||
|
trace!(?pid, "waiting completed");
|
||||||
return_once_successful_shutdown.send(e).unwrap();
|
return_once_successful_shutdown.send(e).unwrap();
|
||||||
} else {
|
} else {
|
||||||
debug!(?pid, "Looks like participant is already dropped");
|
debug!(?pid, "Looks like participant is already dropped");
|
||||||
|
Loading…
Reference in New Issue
Block a user