We study a random process with reinforcement, which evolves following the dynamics of a given diffusion process in a bounded domain and is resampled according to its occupation measure when it reaches the boundary. We show that its occupation measure converges to the unique quasi-stationary distribution of the diffusion process absorbed at the boundary of the domain. Our proofs use recent results in the theory of quasi-stationary distributions and stochastic approximation techniques.