Skip to content

Commit

Permalink
Inverted return value
Browse files Browse the repository at this point in the history
  • Loading branch information
lukes3315 committed Dec 14, 2023
1 parent 247fe2b commit 78edd70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions c/src/point_one/polaris/polaris.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ void Polaris_Disconnect(PolarisContext_t* context) {
P1_DebugPrint("Closing Polaris connection.\n");
context->disconnected = 1;
#ifdef POLARIS_USE_TLS
if (pthread_mutex_init(&context->context_lock, NULL) != 0){
if (pthread_mutex_init(&context->context_lock, NULL) == 0){
SSL_shutdown(context->ssl);
pthread_mutex_destroy(&context->context_lock);
}
Expand Down Expand Up @@ -885,7 +885,7 @@ static int OpenSocket(PolarisContext_t* context, const char* endpoint_url,
void CloseSocket(PolarisContext_t* context, int destroy_context) {
#ifdef POLARIS_USE_TLS
if (destroy_context && context->ssl != NULL) {
if (pthread_mutex_init(&context->context_lock, NULL) != 0){
if (pthread_mutex_init(&context->context_lock, NULL) == 0){
if (SSL_get_shutdown(context->ssl) == 0) {
SSL_shutdown(context->ssl);
}
Expand Down

0 comments on commit 78edd70

Please sign in to comment.