Reference: Fataawa Ramadhaan – Volume 2, Page 450-451, Fatwa No.377
Question: During the day in Ramadhaan, a man suffering form an uncontrollable flow of urine wanted to dry his penis, and while doing so some sperm came out [so what is the ruling regarding his fast for that day]?
Response: If the sperm which came out was as a result of the arousal of his desire, i.e. he tried to squeeze out [any remaining] urine from his penis and as a result he became aroused and then excreted [semen], then his fast is nullified, because excreting semen out of desire based upon the action of the fasting person [himself] breaks the fast. If, however, this was without desire, then certainly his fast is valid and he is not required to make it up.