Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lukes3315 committed Dec 14, 2023
1 parent e15762c commit b75e055
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->context_mutex, NULL) != NULL){
if (pthread_mutex_init(&context->context_lock, NULL) != NULL){
SSL_shutdown(context->ssl);
pthread_mutex_destroy(&context->context_mutex);
pthread_mutex_destroy(&context->context_lock);
}
#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->context_mutex, NULL) != NULL){
if (pthread_mutex_init(&context->context_lock, NULL) != NULL){
if (SSL_get_shutdown(context->ssl) == 0) {
SSL_shutdown(context->ssl);
}
SSL_free(context->ssl);
}
context->ssl = NULL;
pthread_mutex_destroy(&context->context_mutex);
pthread_mutex_destroy(&context->context_lock);
}
}
#endif
Expand Down

0 comments on commit b75e055

Please sign in to comment.