It was narrated from Al-Miqdad bin Al-Aswad that 'Ali told him to ask the Messenger of Allah (ﷺ) about a man who comes close to his wife and prostatic fluid comes out of him - what should he do? ('Ali said:
) For his daughter is married to me and I feel too shy to ask him. So I asked the Messenger of Allah (ﷺ) about that and he said: "If any one of you experiences that, let him sprinkle water on his private part and perform Wudu' as for Salah."
English reference: Vol. 1, Book 1, Hadith 156
Arabic reference: Book 1, Hadith 157