mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Avoid exceeding call stack when draining message group in Switch
Fixes #5013
This commit is contained in:
		| @@ -352,7 +352,9 @@ module.exports = function(RED) { | |||||||
|                     if (msgs.length === 0) { |                     if (msgs.length === 0) { | ||||||
|                         done() |                         done() | ||||||
|                     } else { |                     } else { | ||||||
|  |                         setImmediate(() => { | ||||||
|                             drainMessageGroup(msgs,count,done); |                             drainMessageGroup(msgs,count,done); | ||||||
|  |                         }) | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|             }) |             }) | ||||||
| @@ -505,7 +507,9 @@ module.exports = function(RED) { | |||||||
|                 if (err) { |                 if (err) { | ||||||
|                     node.error(err,nextMsg); |                     node.error(err,nextMsg); | ||||||
|                 } |                 } | ||||||
|  |                 setImmediate(() => { | ||||||
|                     processMessageQueue() |                     processMessageQueue() | ||||||
|  |                 }) | ||||||
|             }); |             }); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user