Add a private connection shutdown method for error cases.