Skip to content

Commit

Permalink
Merge pull request #3 from guardicore/gal/fix_deadlock
Browse files Browse the repository at this point in the history
Fixed deadlock bug in nanomsg
  • Loading branch information
guy-kalinski authored Nov 12, 2018
2 parents 7790e08 + ea5e4c8 commit 6287f1e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/global.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,10 +1122,14 @@ static void nn_global_submit_statistics ()

nn_glock_lock ();
s = self.socks [i];
if (!s)
if (!s) {
nn_glock_unlock ();
continue;
if (i == self.statistics_socket)
}
if (i == self.statistics_socket) {
nn_glock_unlock ();
continue;
}
nn_ctx_enter (&s->ctx);
nn_glock_unlock ();

Expand Down

0 comments on commit 6287f1e

Please sign in to comment.