connection encapsulation
Close() now has a safe fallback