Yahya related to me from Malik from Abu'z Zinad from al-Araj from Abu Hurayra that the Messenger of Allah ﷺ said, "You are in prayer as long as the prayer detains you and there is nothing that prevents you from returning to your family except the prayer."
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ لاَ يَزَالُ أَحَدُكُمْ فِي صَلاَةٍ مَا كَانَتِ الصَّلاَةُ تَحْبِسُهُ لاَ يَمْنَعُهُ أَنْ يَنْقَلِبَ إِلَى أَهْلِهِ إِلاَّ الصَّلاَةُ