| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 463f294 commit b8e3a5f
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -290,7 +290,7 @@ too many listeners have been added to an event | |||
| 290 | 290 | ||
| 291 | 291 | ```txt | |
| 292 | 292 | $ node | |
| 293 | - > event.defaultMaxListeners = 1; | ||
| 293 | + > events.defaultMaxListeners = 1; | ||
| 294 | 294 | > process.on('foo', () => {}); | |
| 295 | 295 | > process.on('foo', () => {}); | |
| 296 | 296 | > (node:38638) Warning: Possible EventEmitter memory leak detected. 2 foo | |
@@ -303,7 +303,7 @@ adds a custom handler to the `'warning'` event: | |||
| 303 | 303 | ```txt | |
| 304 | 304 | $ node --no-warnings | |
| 305 | 305 | > var p = process.on('warning', (warning) => console.warn('Do not do that!')); | |
| 306 | - > event.defaultMaxListeners = 1; | ||
| 306 | + > events.defaultMaxListeners = 1; | ||
| 307 | 307 | > process.on('foo', () => {}); | |
| 308 | 308 | > process.on('foo', () => {}); | |
| 309 | 309 | > Do not do that! | |
| Back | FazBrowse Home | New Git URL |
0 commit comments