Only set the stratum auth flag once and once the stratum thread is started, use that to set/unset the stratum active flag.