Cleaner, more performant way to handle close connections.