fixed reseting IsConnected on socket exception that indicated that
something went wrong with the network