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

how do I auto reconnect if the server goes down? #431

Closed
x13machine opened this issue Dec 8, 2015 · 1 comment
Closed

how do I auto reconnect if the server goes down? #431

x13machine opened this issue Dec 8, 2015 · 1 comment

Comments

@x13machine
Copy link

how do I auto reconnect if the server goes down? I'm using the latest version

@x13machine x13machine changed the title how do I auto reconnect if the server go down? how do I auto reconnect if the server goes down? Dec 8, 2015
@x13machine x13machine reopened this Dec 9, 2015
@ineeee
Copy link

ineeee commented Jan 8, 2016

Its not documented anywhere, but you can pass retryCount and retryDelay when creating a new Client. It will automatically reconnect if the connection is dropped.

var irc = require('irc');

new irc.Client('irc.example.org', 'someone', {
    // milliseconds to wait between retries
    retryDelay: 1000,

    // max attempts
    retryCount: 2
}

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