Autodetect of connection

Whether socket is connected or not - it will be autodetected now