It is so weird that the exact same thing happened to me! I went out with a guy for 2 years then we didn't talk for 6 months and he came back and it went the exact same way. I ended up getting my hopes up for him to turn round and say he had changed his mind and we shouldn't be friends.
I think that with ex, if it doesn't work it doesn't and won't work another time. Obviously its upsetting at the start because you feel used and lied to, but you will realize that it is what is best and you will be stronger for it. The longer you wait to see if the hope you have comes true the more you will get hurt if it doesn't. I don't know your exact circumstances, but from my own experience, I would walk away before too much hurt is caused.