Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed windows signalling bug (fixes #189)

Assuming that there may be a lag between nn_efd_signal and the data
available in nn_efd_unsignal, we set NN_SOCK_FLAG_IN/OUT if we have a
sucessful return from nn_efd_wait. Setting this flag is safe at any
time. And I expect that it should not create a bottleneck
  • Loading branch information...
commit cb9455386904b41bc8c61a5d95d04c2ebaab156a 1 parent 41fc2a2
@tailhook tailhook authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  src/core/sock.c
View
2  src/core/sock.c
@@ -586,6 +586,7 @@ int nn_sock_send (struct nn_sock *self, struct nn_msg *msg, int flags)
return -EINTR;
errnum_assert (rc == 0, rc);
nn_ctx_enter (&self->ctx);
+ self->flags |= NN_SOCK_FLAG_OUT;
/* If needed, re-compute the timeout to reflect the time that have
already elapsed. */
@@ -658,6 +659,7 @@ int nn_sock_recv (struct nn_sock *self, struct nn_msg *msg, int flags)
return -EINTR;
errnum_assert (rc == 0, rc);
nn_ctx_enter (&self->ctx);
+ self->flags |= NN_SOCK_FLAG_IN;
/* If needed, re-compute the timeout to reflect the time that have
already elapsed. */
Please sign in to comment.
Something went wrong with that request. Please try again.