loggly / node-loggly-bulk

A client implementation for Loggly in node.js
https://www.loggly.com/docs/node-js-logs/
Other
20 stars 20 forks source link

Clear all open interval and resolve callback error #15

Closed Shwetajain148 closed 7 years ago

Shwetajain148 commented 7 years ago

@mchaudhary @mostlyjason, I looked at the PR #14 and used the clearInterval() in our library to clear open interval for sendBufferdLogstoLoggly() function but using clearInterval() function only for buffer function did not help to overcome the callback issue. I used the clearInterval() function for both sendBulkLogs() and sendBufferdLogstoLoggly() functions then the callback error was removed. I ran the application continue for 30 minutes but the error did not occur. Before it was occurring in less than a minute.

I tested in below scenarios:

In both Bulk and Input mode with below conditions-

(a) Sending a single event (Worked Fine) (b) Sending events in a loop (Worked Fine) (c) Sending events continuous in a loop at a specific interval (Worked Fine)

In Network Outage case. (Worked Fine)

This PR will resolve the issue https://github.com/loggly/winston-loggly-bulk/issues/13

Please review.