Browse Source

Revert "Only allow one send_recv_proc at a time"

This reverts commit 9d793945f0.
master
ckolivas 10 years ago
parent
commit
c4ec64929d
  1. 6
      src/ckpool.c

6
src/ckpool.c

@ -489,20 +489,16 @@ char *_send_recv_proc(proc_instance_t *pi, const char *msg, const char *file, co
LOGALERT("Attempting to send message %s to dead process %s", msg, pi->processname); LOGALERT("Attempting to send message %s to dead process %s", msg, pi->processname);
goto out; goto out;
} }
mutex_lock(&pi->lock);
sockd = open_unix_client(path); sockd = open_unix_client(path);
if (unlikely(sockd < 0)) { if (unlikely(sockd < 0)) {
LOGWARNING("Failed to open socket %s in send_recv_proc", path); LOGWARNING("Failed to open socket %s in send_recv_proc", path);
goto out_unlock; goto out;
} }
if (unlikely(!send_unix_msg(sockd, msg))) if (unlikely(!send_unix_msg(sockd, msg)))
LOGWARNING("Failed to send %s to socket %s", msg, path); LOGWARNING("Failed to send %s to socket %s", msg, path);
else else
buf = recv_unix_msg(sockd); buf = recv_unix_msg(sockd);
Close(sockd); Close(sockd);
out_unlock:
mutex_unlock(&pi->lock);
out: out:
if (unlikely(!buf)) if (unlikely(!buf))
LOGERR("Failure in send_recv_proc from %s %s:%d", file, func, line); LOGERR("Failure in send_recv_proc from %s %s:%d", file, func, line);

Loading…
Cancel
Save