Hi folks,
I'm trying to make a reconnection algorithm using rexec(), but I noticed that when rexec() fails returning -1, it is impossible to make it run successfully again until you restart the program or the thread.
Example, I have a endless loop for connection retries, if I supply a wrong password for a given username, rexec fails, it's ok. But my program keeps trying to connect calling rexec function, so if I change the password for that user in the host to the password that rexec is giving, it should connect successfuly, but I keep getting the same login error. The curious is if I restart my program or even if I finish the thread and start the thread again it connects succesfully.
I think it's a bug in rexec, does anyone had a problem similar to that and can help me.
Due to that problem I'm writing a code just to restart the threads that failed in rexec, but it's getting much more complex than it should be.
Thanks in advance for any help.