Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qlibssh2 crashes when multiple Ssh2Client are created and destroy #8

Open
vpicaver opened this issue Jul 9, 2021 · 0 comments
Open

Comments

@vpicaver
Copy link
Contributor

vpicaver commented Jul 9, 2021

For example:

{
SSh2Client client1 (settings)
// ... Do stuff with client1
}

{
Ssh2Client client2 (settings)
// ... Do stuff with client2, this will crash on windows
}

Client2 will crash because libssh2_exit() and then libssh2_init() is called again. libssh2_init() should only be called once, and libssh2_exit() should be called on program exit.

vpicaver added a commit to vpicaver/qlibssh2 that referenced this issue Jul 9, 2021
This removes the reference counting on libssh2_init() and libssh2_exit()
If a instance of Ssh2Client is ever created, then connection is mad with QCoreApplication to exit libssh2 using libssh2_exit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant