再次修改了一些内容
This commit is contained in:
@@ -239,12 +239,14 @@ impl<T: StreamType> Bot<T> {
|
||||
0x1A => {// 断连包
|
||||
// disconnect
|
||||
self.handle_disconnect(&mut packet).await?;
|
||||
status_tx.send(2).unwrap();
|
||||
break;
|
||||
}
|
||||
0x00 => {// 版本不匹配啥的就会走这
|
||||
if self.status == 0{
|
||||
let text = packet.read_string()?;
|
||||
println!("[{}] Failed to login: {}", self.username, utils::parse_json_component(text.as_str()));
|
||||
status_tx.send(2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -321,7 +323,7 @@ impl<T: StreamType> Bot<T> {
|
||||
iter += 1;
|
||||
}
|
||||
sleep(Duration::from_millis(1));
|
||||
flag = self.conn.lock().await.is_alive();
|
||||
flag = self.conn.lock().await.is_alive() && status!=2;
|
||||
}
|
||||
println!("[{}/WORKER] Worker stopped.", self.username);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user