Check connection state