You are right, whatever the situation whether winning or losing then it is better to stop with the aim of calming down. Also, don't forget to do research first so that we don't have the wrong mindset in responding to gambling.
Refreshing your session either you are in the winning side or in the losing will keeps you away from exceeding to your set limitation, as long as you are capable to control your emotion you have a good glimpse of preventing yourself getting addicted, it's always your choice and your own will that's why most of those who got addicted are people who unable to think clearly those who intend to win more but unfortunately they end up losing as they can't control their own greed.
Sometimes this becomes a crucial situation because in the end before stopping there is always a conflict within ourselves especially when we are winning a lot or losing a lot which is because when we lose we will definitely not feel satisfied when stopping and when we win with a large amount we always assume that there will be another bigger win waiting so in the end there is always a conflict with this. But this is precisely what should be underlined that greed will not have a good impact especially in gambling, so when our control weakens as much as possible we must make some differentiators so that we stay awake from activities that are beyond expectations and so that we remain in healthy gambling where we can take a responsible attitude in it.