celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [celix] abroekhuis commented on a change in pull request #245: Bugfix/data races
Date Mon, 08 Jun 2020 10:03:48 GMT

abroekhuis commented on a change in pull request #245:
URL: https://github.com/apache/celix/pull/245#discussion_r436586585



##########
File path: bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_handler.c
##########
@@ -1266,9 +1269,12 @@ void pubsub_tcpHandler_handler(pubsub_tcpHandler_t *handle) {
         }
         pubsub_tcpHandler_close(handle, events[i].ident);
       } else if (events[i].flags & EV_ERROR) {
+        celixThreadRwlock_unlock(&handle->dbLock);
         L_ERROR("[TCP Socket]:EPOLLERR  ERROR read from socket %s\n", strerror(errno));
         pubsub_tcpHandler_close(handle, events[i].ident);
         continue;
+      } else {
+        celixThreadRwlock_unlock(&handle->dbLock);

Review comment:
       But, since it is done in every branch, it can be done before the if?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message