Also, when do you know it's time to just give up, that there was never any chance that a prospect was ever actually going to buy (at a price that made any sense)?
The advice is going to differ dramatically based on the lens. If it's a pricing impasse, are you sure you know their budget and fiscal generals? Are they aware that terms can sometimes be made agreeable? It might help to talk terms instead.
I'm also a big fan of asking how the impasse felt to you. If it's just frustrating in general, maybe it needs more teasing apart. But if the people seemed awkward to work with, I'd hold onto that thought for sure. A bad sale can be worse than a missed one.
Good luck to you