"Abu Bakrah wrote to me, saying: 'I heard the Messenger of Allah say: No one should pass two judgments on one issue, and no one should pass judgment between two disputing parties while he is angry.'"
Sunan an-Nasa'i Book 49, Hadith 43