public function logoutAndDisconnect()
    {
        if($this->connected)
        {
            // Adds some delay defore disconnect
            sleep(rand(1, 2));
            
            $this->offline();
            $this->whatsProt->disconnect();

            $this->connected = false;
        }
    }