diff --git a/lib/messagesx.c b/lib/messagesx.c index 90bcc91..6bf76ca 100644 --- a/lib/messagesx.c +++ b/lib/messagesx.c @@ -122,10 +122,12 @@ static inline int __sxmsg_send(chnl_t *channel, const char *data, size_t datalen pthread_mutex_unlock(&co->write_pending_lock); } - //pthread_mutex_lock(&msg->wait); /* we will sleep here */ + pthread_mutex_lock(&msg->wait); /* we will sleep here */ +#if 0 while(pthread_mutex_trylock(&msg->wait)) { //printf("here opcode = %d\n", head->opcode); } +#endif if(head->payload_length) { *omsg = msg;