Threshold effect for probabilistic entanglement swapping