How can you tell that someone actually wants to be talking to you? Give ’em an out.
Look, you should watch for signs. If someone puts on their coat and puts their bag over their shoulder, then they want to leave. Let them! But the signs aren’t always as obvious. So make sure you’re giving the opportunities.
Here’s an easy one: let them talk last. If they say something nice, give an easy “thanks!” and then don’t respond right away. If they say something else to start a new thread, then great! They want to continue the conversation. Check in like that every few minutes and make sure you’re asking more questions than you’re answering, and 99% of the time you’ll be in conversations the other person is enjoying.
It’s easy to trap people and hard to be self-aware. So build the patterns, give ’em an out, and spend your time with people who want to spend time with you.