Should I take him back?

My boyfriend and I broke up on Thursday, he wanted to end things because he’s leaving for the military and is afraid we won’t see each other or that he won’t want to leave. When he ended things I was confused and sad. We were totally fine earlier that day and then boom it ended. For the past few days I’ve seen him and he wouldn’t even look at me, despite our breakup being somewhat friendly and understanding. Well anyway, he wants me back now and he can’t get me off his mind. My problem is that I do want to get back together but, I’m not sure if that’s a good idea. He’s a sweet guy and we have an amazing time together but I don’t know what to do. Any thoughts??