I can not figure out if this is a bug or a feture (but i can not find any documentation saying that this is normal behavior), i'm trying to set a timeout value for the connect function on a non-blocking session.
i'm setting the options as:
sshoptionsset(session, SSHOPTIONSTIMEOUT, &timeout);
the timeout for the connect call becomes more like 10 seconds then 1.
In the misc.c in the function sshtimeoutelapsed() i can see that if the value timeout that is passed to that function == 0 there is no timeout, and if the socket is non blocking we are calling that function with the option SSHTIMEOUTNONBLOCKING which is defined as 0 in the include/libssh/session.h
So from what i can see, the option i sent in with sshoptionsset is never used when i use non-blocking sockets.