From 0cfc6d39caf94e10530bc55130f6fdf271055698 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Fri, 8 May 2015 14:41:57 -0400 Subject: [PATCH] doc: recommend Infinity on emitter.setMaxListeners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of recommending `0` as the magic value to set max listeners to unlimited, recommend `Infinity`. This paves the way for `0` as a magic value eventually being deprecated and finally removed. PR-URL: https://github.com/nodejs/node/pull/2559 Reviewed-By: Colin Ihrig Reviewed-By: targos - Michaƫl Zasso Reviewed-By: Brendan Ashworth Reviewed-By: Roman Reiss --- doc/api/events.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/events.markdown b/doc/api/events.markdown index 8a9301cff6fbbd..543d263dc3d799 100644 --- a/doc/api/events.markdown +++ b/doc/api/events.markdown @@ -92,7 +92,7 @@ Returns emitter, so calls can be chained. By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default which helps finding memory leaks. Obviously not all Emitters should be limited to 10. This function -allows that to be increased. Set to zero for unlimited. +allows that to be increased. Set to `Infinity` (or `0`) for unlimited. Returns emitter, so calls can be chained.