Being cool means you're not really attached to the outcome. You'd like a connection to happen, but it's not like your world is gonna end if it doesn't.
So the coolest response would be something like, "oh alright, no worries, hey it was great to meet you!" You can politely excuse yourself at this point or be even more classy by continuing the conversation for a minute or so and then excusing yourself with something like "Hey, see you around, take care of yourself."