What does it mean when a guy loses his erection during sex?

My boyfriend and I have been together for 6 months and have sex on a regular basis. He always ejaculates but the past few times when he'll pull out, he will immediately lose his erection & go limp. Am I doing something wrong?