Ensure closing a net connection