Skip to content

Commit e9fb5af

Browse files
committed
openssl: retry initialization on failure
When we fail to initialize the OpenSSL subsystem, don't assume that we're "initialized". Subsequent initialization requests -- if there are any -- should replay initialization and fail again.
1 parent 655158f commit e9fb5af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libgit2/streams/openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static int openssl_ensure_initialized(void)
198198
if ((error = git_openssl_stream_dynamic_init()) == 0)
199199
error = openssl_init();
200200

201-
openssl_initialized = true;
201+
openssl_initialized = !error;
202202
}
203203

204204
error |= git_mutex_unlock(&openssl_mutex);

0 commit comments

Comments
 (0)