Ref. No. 2284/44-339
In the name of Allah the most Gracious the most Merciful
The answer to your question is as follows:
The salah was valid when you offered. Hence, you are not required to repeat that salah.
And Allah knows best
Darul Ifta
Darul Uloom Waqf Deoband