Tochachah until when?

So, on Eirukhin 17b, R' Yehudah says that if someone doesn't accept
your tokhachah, you need to keep at it ad sheyizof bo. Rav says ad
haka'ah. And this machloqes carries through to the Rambam (Dei'os 6)
who holds like Rav, and the Semag who holds like R Yehudah. The
AhS notes both shitos in OC 156:9
<https://www.sefaria.org/Arukh_HaShulchan%2C_Orach_Chaim.156.9&gt;\.

I don't get it. Later in the same se'if, the AhS records the Semag's
opinion that you don't give tokhachah that won't be headed, because
it will lead to his sin'ah and nothing else.

So, when does the Semag say you should stop -- when you realize they
aren't listening, or ad sheyiznof bo?

How do these two issues shtim together?

Tir'u baTov!
-Micha