Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lukes3315 committed Dec 14, 2023
1 parent 234bd2b commit e15762c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions c/src/point_one/polaris/polaris.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ void Polaris_Disconnect(PolarisContext_t* context) {
P1_DebugPrint("Closing Polaris connection.\n");
context->disconnected = 1;
#ifdef POLARIS_USE_TLS
if (pthread_mutex_init(&context->ssl_mutex, NULL) != NULL){
if (pthread_mutex_init(&context->context_mutex, NULL) != NULL){
SSL_shutdown(context->ssl);
pthread_mutex_destroy(&context->ssl_mutex);
pthread_mutex_destroy(&context->context_mutex);
}
#endif
shutdown(context->socket, SHUT_RDWR);
Expand Down Expand Up @@ -885,14 +885,14 @@ 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->ssl_mutex, NULL) != NULL){
if (pthread_mutex_init(&context->context_mutex, NULL) != NULL){
if (SSL_get_shutdown(context->ssl) == 0) {
SSL_shutdown(context->ssl);
}
SSL_free(context->ssl);
}
context->ssl = NULL;
pthread_mutex_destroy(&context->ssl_mutex);
pthread_mutex_destroy(&context->context_mutex);
}
}
#endif
Expand Down

0 comments on commit e15762c

Please sign in to comment.