cluster: don't silently drop messages when the write queue gets big
This commit is contained in:
parent
2301eb69b1
commit
cfa28690db
@ -329,11 +329,6 @@ function setupChannel(target, channel) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// For overflow protection don't write if channel queue is too deep.
|
|
||||||
if (channel.writeQueueSize > 1024 * 1024) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// package messages with a handle object
|
// package messages with a handle object
|
||||||
if (handle) {
|
if (handle) {
|
||||||
// this message will be handled by an internalMessage event handler
|
// this message will be handled by an internalMessage event handler
|
||||||
@ -379,7 +374,8 @@ function setupChannel(target, channel) {
|
|||||||
|
|
||||||
writeReq.oncomplete = nop;
|
writeReq.oncomplete = nop;
|
||||||
|
|
||||||
return true;
|
/* If the master is > 2 read() calls behind, please stop sending. */
|
||||||
|
return channel.writeQueueSize < (65536 * 2);
|
||||||
};
|
};
|
||||||
|
|
||||||
target.connected = true;
|
target.connected = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user