Skip to content

Commit

Permalink
Merge pull request nanomsg#346 from bnewbold/master
Browse files Browse the repository at this point in the history
Fix locking bug in nn_global_submit_statistics()
  • Loading branch information
djc committed Dec 17, 2014
2 parents 8a7235c + a52e251 commit 6a333ae
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 @@ -1124,10 +1124,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 6a333ae

Please sign in to comment.