Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@carlosmn
Copy link
Member

@carlosmn carlosmn commented Mar 3, 2016

We should have been doing this, but it initializes itself upon first
use, which works as long as nobody's doing concurrent network
operations. Initialize it on our init to make sure it's not getting
initialized concurrently.

We should have been doing this, but it initializes itself upon first
use, which works as long as nobody's doing concurrent network
operations. Initialize it on our init to make sure it's not getting
initialized concurrently.
@srajko
Copy link
Contributor

srajko commented Mar 3, 2016

Nice, I started putting this together too based on your suggestion (mine needs to be fixed up though).

Might be good to do a matching call to libssh2_exit too - https://github.com/srajko/libgit2/blob/b7187061277e15daf92cff5451f47bcfc019c6e0/src/transports/ssh.c#L840-L850

@carlosmn
Copy link
Member Author

carlosmn commented Mar 3, 2016

We don't free OpenSSL either. It's a bit of an edge-case if libgit2's lifetime doesn't match the applications, so we don't expect many will actually bother calling libgit2's shutdown function either, so I'm OK with not freeing this right now.

@ethomson
Copy link
Member

ethomson commented Mar 3, 2016

so I'm OK with not freeing this right now.

Me, too. I would like to beat on init (and perhaps shutdown) a little bit more, but that's something to do after this release. :)

ethomson pushed a commit that referenced this pull request Mar 3, 2016
@ethomson ethomson merged commit 1609983 into master Mar 3, 2016
@ethomson ethomson deleted the cmn/init-libssh2 branch January 9, 2019 10:20
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

Successfully merging this pull request may close these issues.

4 participants