1
0

fix client heartbeat condition

This commit is contained in:
EAimTY 2023-02-05 19:04:47 +09:00
parent 502242d2e1
commit 5b8878c153

View File

@ -393,7 +393,9 @@ impl Connection {
loop {
time::sleep(heartbeat).await;
if self.is_closed() {
let task_count = self.model.task_connect_count() + self.model.task_associate_count();
if self.is_closed() || task_count == 0 {
break;
}