@@ -35,7 +35,8 @@ function sendMessage(cmd, options, filter, cb) {
35
35
36
36
if ( cluster . isWorker === true ) {
37
37
createWaiter ( msg , process , cb ) ;
38
- return process . send ( msg ) ; // send to master and wait for response
38
+ // send to master and wait for response
39
+ return cservice . processSafeSend ( process , msg ) ;
39
40
}
40
41
41
42
var workers = cluster . workers ;
@@ -76,7 +77,7 @@ function createWaiter(msg, process, cb) {
76
77
function createWaiterTask ( msg , process ) {
77
78
return function ( asyncCb ) {
78
79
var waiter = createWaiter ( msg , process , asyncCb ) ;
79
- process . send ( msg ) ;
80
+ cservice . processSafeSend ( process , msg ) ;
80
81
if ( ! waiter ) {
81
82
// if no waiter, cb immediately
82
83
asyncCb ( ) ;
@@ -87,7 +88,7 @@ function createWaiterTask(msg, process) {
87
88
function respondToMessage ( msg , process , error , response ) {
88
89
msg . error = error ;
89
90
msg . response = response ;
90
- process . send ( msg ) ;
91
+ cservice . processSafeSend ( process , msg ) ;
91
92
}
92
93
93
94
function processMessage ( msg ) {
0 commit comments