My God .... sorry I have bored you. I found a variable not initialized in my code. There is nothinhg to explain. The program is doing what I wrote. They were not real resets, but jumps to the beginning of the program.
Sorry again, but I was becoming crazy ...
Thanks Darrel. It is watching to RCON that I realized they were not Resets.
Marco