Sayyiduna Ali (may Allah be pleased with him) said: "Whoever is praying and feels a disturbance in his stomach, or vomits, or has a nosebleed, and fears that he will lose his ablution before the imam gives the salam, should place his hand on his nose (and leave). Then, after performing ablution, if he wishes he may continue on the same prayer provided he has not spoken, that is, he does not repeat what has already passed. Then he should complete the rest of the prayer, and if he has spoken in the meantime, he should start afresh. And if he has already sat for the tashahhud and fears that his ablution will be broken before the imam gives the salam, he should give the salam (beforehand); his prayer is complete."
Al-Harith al-A'war is da'if (weak), and Asim bin Damrah is not strong. It has also been narrated from Ali (may Allah be pleased with him) through a third route, and there is weakness in it too. And Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3386