diff --git a/src/session.c b/src/session.c
index edc1514..0a8db0e 100644
--- a/src/session.c
+++ b/src/session.c
@@ -568,6 +568,16 @@
 
         /* CH UNLOCK */
         pthread_mutex_unlock(session->opts.server.ch_lock);
+
+        /* wait for CH thread to actually wake up */
+        i = (NC_SESSION_FREE_LOCK_TIMEOUT * 1000) / NC_TIMEOUT_STEP;
+        while (i && (session->flags & NC_SESSION_CALLHOME)) {
+            usleep(NC_TIMEOUT_STEP);
+            --i;
+        }
+        if (session->flags & NC_SESSION_CALLHOME) {
+            ERR("Session %u: Call Home thread failed to wake up in a timely manner, fatal synchronization problem.", session->id);
+        }
     }
 
     connected = nc_session_is_connected(session);
@@ -688,13 +698,14 @@
     }
 
     if (session->side == NC_SERVER) {
-        i = (NC_SESSION_FREE_LOCK_TIMEOUT * 1000) / NC_TIMEOUT_STEP;
-        while (i && (session->flags & NC_SESSION_CALLHOME)) {
-            usleep(NC_TIMEOUT_STEP);
-            --i;
+        /* free CH synchronization structures if used */
+        if (session->opts.server.ch_cond) {
+            pthread_cond_destroy(session->opts.server.ch_cond);
+            free(session->opts.server.ch_cond);
         }
-        if (session->flags & NC_SESSION_CALLHOME) {
-            ERR("Session %u: Call Home thread failed to exit in a timely manner, fatal synchronization problem.", session->id);
+        if (session->opts.server.ch_lock) {
+            pthread_mutex_destroy(session->opts.server.ch_lock);
+            free(session->opts.server.ch_lock);
         }
     }
 
diff --git a/src/session_server.c b/src/session_server.c
index 5733581..4f2f6d0 100644
--- a/src/session_server.c
+++ b/src/session_server.c
@@ -2773,7 +2773,7 @@
 static int
 nc_server_ch_client_thread_session_cond_wait(struct nc_session *session, struct nc_ch_client_thread_arg *data)
 {
-    int ret;
+    int ret = 0, r;
     uint32_t idle_timeout;
     struct timespec ts;
     struct nc_ch_client *client;
@@ -2801,15 +2801,16 @@
         nc_gettimespec_real(&ts);
         nc_addtimespec(&ts, NC_CH_NO_ENDPT_WAIT);
 
-        ret = pthread_cond_timedwait(session->opts.server.ch_cond, session->opts.server.ch_lock, &ts);
-        if (ret && (ret != ETIMEDOUT)) {
-            ERR("Pthread condition timedwait failed (%s).", strerror(ret));
-            goto ch_client_remove;
-        }
-
-        if (session->status == NC_STATUS_CLOSING) {
-            /* session is being freed, finish thread */
-            goto ch_client_remove;
+        r = pthread_cond_timedwait(session->opts.server.ch_cond, session->opts.server.ch_lock, &ts);
+        if (!r) {
+            /* we were woken up, something probably happened */
+            if (session->status != NC_STATUS_RUNNING) {
+                break;
+            }
+        } else if (r != ETIMEDOUT) {
+            ERR("Pthread condition timedwait failed (%s).", strerror(r));
+            ret = -1;
+            break;
         }
 
         /* check whether the client was not removed */
@@ -2819,7 +2820,8 @@
             /* client was removed, finish thread */
             VRB("Call Home client \"%s\" removed, but an established session will not be terminated.",
                 data->client_name);
-            goto ch_client_remove;
+            ret = 1;
+            break;
         }
 
         if (client->conn_type == NC_CH_PERSIST) {
@@ -2841,27 +2843,15 @@
 
     } while (session->status == NC_STATUS_RUNNING);
 
-    /* CH UNLOCK */
-    pthread_mutex_unlock(session->opts.server.ch_lock);
-
-    return 0;
-
-ch_client_remove:
-    pthread_cond_destroy(session->opts.server.ch_cond);
-    free(session->opts.server.ch_cond);
-    session->opts.server.ch_cond = NULL;
+    if (session->status == NC_STATUS_CLOSING) {
+        /* signal to nc_session_free() that we registered session being freed, otherwise it matters not */
+        session->flags &= ~NC_SESSION_CALLHOME;
+    }
 
     /* CH UNLOCK */
     pthread_mutex_unlock(session->opts.server.ch_lock);
 
-    pthread_mutex_destroy(session->opts.server.ch_lock);
-    free(session->opts.server.ch_lock);
-    session->opts.server.ch_lock = NULL;
-
-    /* make the session a standard one */
-    session->flags &= ~NC_SESSION_CALLHOME;
-
-    return 1;
+    return ret;
 }
 
 static void *
@@ -2974,7 +2964,8 @@
 
 API int
 nc_connect_ch_client_dispatch(const char *client_name,
-                              void (*session_clb)(const char *client_name, struct nc_session *new_session)) {
+                              void (*session_clb)(const char *client_name, struct nc_session *new_session))
+{
     int ret;
     pthread_t tid;
     struct nc_ch_client_thread_arg *arg;
