Log disconnect events
This commit is contained in:
parent
29b7d0ed7a
commit
63464fdc59
1 changed files with 8 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ use std::sync::{Arc, Mutex};
|
|||
use std::time::Duration;
|
||||
|
||||
use cookie::{Cookie, CookieJar};
|
||||
use log::{debug, warn};
|
||||
use log::{debug, info, warn};
|
||||
use tokio::select;
|
||||
use tokio::sync::{mpsc, oneshot};
|
||||
use tokio_tungstenite::tungstenite;
|
||||
|
|
@ -440,6 +440,13 @@ impl Instance {
|
|||
break;
|
||||
}
|
||||
}
|
||||
Ok(Data::DisconnectEvent(ev)) => {
|
||||
if ev.reason == "authentication changed" {
|
||||
info!("{}: Disconnected because {}", config.name, ev.reason);
|
||||
} else {
|
||||
warn!("{}: Disconnected because {}", config.name, ev.reason);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue