async fn disconnect(&mut self, msg: &str) {
        if let Some(hook) = &mut self.handler {
            hook.handle_disconnect().await;
        }

        self.client.disconnect();
        self.conn_state = ConnectionState::Disconnected;
        error!("{}", msg);

        // thread::sleep(conf::RECONNECT_SLEEP);
        info!("1s sleep start");
        smol::Timer::after(conf::RECONNECT_SLEEP).await;
    }
/// Disconnects from the Blynk servers
///
/// Calls disconnect hook
Disconnects from the Blynk servers
Calls disconnect hook
Disconnects from the Blynk servers Calls disconnect hook
async fn disconnect(&mut self, msg: &str) {
        if let Some(hook) = &mut self.handler {
            hook.handle_disconnect().await;
        }
        self.client.disconnect();
        self.conn_state = ConnectionState::Disconnected;
        error!("{}", msg);
        // thread::sleep(conf::RECONNECT_SLEEP);
        info!("1s sleep start");
        smol::Timer::after(conf::RECONNECT_SLEEP).await;
    }
async fn disconnect ( & mut self , msg : & str ) { if let Some ( hook ) = & mut self . handler { hook . handle_disconnect ( ) . await ; } self . client . disconnect ( ) ; self . conn_state = ConnectionState :: Disconnected ; error ! ( " " msg ) ; // thread::sleep(conf::RECONNECT_SLEEP); info ! ( " " ) ; smol :: Timer :: after ( conf :: RECONNECT_SLEEP ) . await ; }
Disconnects from the Blynk servers
Calls disconnect hook
Disconnects from the Blynk servers Calls disconnect hook
&mut self
msg
&str
&mut self
msg
&str