Refactor how connection preface is required