[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to stop ssh server correctly


Hi!

I have a GUI app with separate thread where ssh server runs.
In that thread I have an infinite loop:
...
while (true)
{
    ssh_session session = ssh_new();
    if (ssh_bind_accept(m_sshbind, session) == SSH_ERROR)
    {
       ...
       return;
    }
    ...
}
Server thread waits infinitely on ssh_bind_accept until connection comes.
How could I stop ssh server thread from GUI thread correctly?

Archive administrator: postmaster@lists.cynapses.org