mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
add IGNORE_ERRORS const
This commit is contained in:
parent
0ccf203460
commit
1a68d55eaf
1 changed files with 9 additions and 3 deletions
|
@ -43,6 +43,8 @@ pub enum Event {
|
|||
Login,
|
||||
}
|
||||
|
||||
const IGNORE_ERRORS: bool = false;
|
||||
|
||||
impl Client {
|
||||
async fn join(account: &Account, address: &ServerAddress) -> Result<Self, String> {
|
||||
let resolved_address = resolver::resolve_address(address).await?;
|
||||
|
@ -147,9 +149,13 @@ impl Client {
|
|||
match r {
|
||||
Ok(packet) => Self::handle(&packet, &tx, &state, &conn).await,
|
||||
Err(e) => {
|
||||
println!("Error: {:?}", e);
|
||||
if e == "length wider than 21-bit" {
|
||||
panic!();
|
||||
if IGNORE_ERRORS {
|
||||
println!("Error: {:?}", e);
|
||||
if e == "length wider than 21-bit" {
|
||||
panic!();
|
||||
}
|
||||
} else {
|
||||
panic!("Error: {:?}", e);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue