The following invalidates the wiping: 1. The end of the permissible time period for wiping. 2. Post-sex impurity. 3. Removal of the socks. If (i) or (iii) occurs...
The following invalidates the wiping:
1. The end of the permissible time period for wiping.
2. Post-sex impurity.
3. Removal of the socks. If (i) or (iii) occurs while the person was in a state of purity, he need only wash his feet.
Source: Fiqh us Sunnah