recognizes if connection is lost now