Skip to content
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

Cleanup missing for tcp socket connections re-opened on close event #131

Open
lvjkumar opened this issue Jan 23, 2020 · 1 comment
Open

Comments

@lvjkumar
Copy link

Connections re-opened on the close event of the socket do not get cleaned up anywhere.

winston-syslog.js
`.on('close', () => {
//
// Attempt to reconnect on lost connection(s), progressively
// increasing the amount of time between each try.
//
const interval = Math.pow(2, this.retries);
this.connected = false;

    setTimeout(() => {
      this.retries++;
      **this.socket.connect(this.port, this.host);**
    }, interval * 1000);
  })`
@askrzypczak
Copy link

i dont seem to have permissions to link this to my PR (open source noob here, sry), but I believe that this PR will fix it: 140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants