fix connection caching bug

also add some verbose logging cc @jehiah @mynameisfiber