Sayyida Fatimah bint Qays (may Allah be pleased with her) says that she went to the Prophet (peace be upon him) and said: "I experience istihada (non-menstrual bleeding)." The Prophet (peace be upon him) said: "This is a vein. When menstruation comes, leave the prayer; when it goes away, perform ghusl and wash the blood from yourself and perform the prayer."
Related hadith on this topic