if socket error detected, connected = false