New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: on newer nodejs versions listening to socket errors are required #1089
fix: on newer nodejs versions listening to socket errors are required #1089
Conversation
From the original code snippet, it is using socket = net.createConnection(config.loggerPort || 5000, config.loggerHost || 'localhost');
Based on
It seems like the behavior did not change and that the @jhonatanTeixeira Would you happen to have any references that newer NodeJS requires listening to socket errors? |
Just run it on a newer nodejs and try to connect to a tcp destination like logstash for example and you will see it trhows an error. Newer nodejs require all errors thrown inside a promise to be catched, so that cancels the connection |
@jhonatanTeixeira I verified. Good find! It's due to the way If there is no listener to the
|
No description provided.