avoid crashing the rsync thread when rsync return with a non-0 code