cleaner start_preferred_master_loop , fix TODO related to using ssl context