I have next code:
using AsterNET.Manager;
using AsterNET.Manager.Event;
private ManagerConnection manager;
private bool StartManager()
        {
            manager = new(
                Properties.Resources.amiAddress,
                Int32.Parse(Properties.Resources.amiPort),
                Properties.Resources.amiLogin,
                Properties.Resources.amiPass
                );
            manager.ConnectionState += new ConnectionStateEventHandler(ConnectionState);
            try
            {
                manager.Login();
                return true;
            }
            catch
            {
                return false;
            }
        }
private void ConnectionState(object sender, ConnectionStateEvent e)
        {
            if (manager.IsConnected())
            {
                
                MessageBox.Show("on");
                notifyIcon1.Icon = Properties.Resources.phone_on;
            }
            else
            {
                
                MessageBox.Show("off");
                notifyIcon1.Icon = Properties.Resources.phone_off;
            }
        }
Asterisk is in the local net. When I break the connection (pull out the cable), manager.IsConnected() is true, but must be false. I don't understand this behavior. How I can check connection?