PengZheng commented on code in PR #551: URL: https://github.com/apache/celix/pull/551#discussion_r1192956130
########## bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_client.c: ########## @@ -630,14 +626,22 @@ static void *rsaShmClientManager_exceptionMsgHandlerThread(void *data) { celix_array_list_t *evictedMsgs = celix_arrayList_create(); while (active) { celixThreadMutex_lock(&clientManager->exceptionMsgListMutex); - while (0 == (listSize = celix_arrayList_size(clientManager->exceptionMsgList)) && clientManager->threadActive == true) { - (void)celixThreadCondition_timedwaitRelative(&clientManager->exceptionMsgListNotEmpty, &clientManager->exceptionMsgListMutex, 0, 200*1000*1000); - } + listSize = celix_arrayList_size(clientManager->exceptionMsgList); for (int i = 0; i < listSize; ++i) { struct rsa_shm_exception_msg *exceptionMsg = celix_arrayList_get(clientManager->exceptionMsgList, i); removed = rsaShmClientManager_handleMsgState(clientManager, exceptionMsg); if (removed) { celix_arrayList_add(evictedMsgs, exceptionMsg); + } else if (clientManager->threadActive == false) { + int fd = socket(AF_UNIX, SOCK_DGRAM, 0); + if (fd >= 0) { + if (bind(fd, (struct sockaddr *) &exceptionMsg->serverAddr, sizeof(struct sockaddr_un)) == 0) { Review Comment: I don't feel right. Missing `pthread_cond_destroy` and `pthread_mutex_destroy` is no big deal compared to this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org