Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = class Connection extends EventEmitter {
this.connected = false;
this.requested_disconnect = false;

this.reconnect_attempts = 0;
this.reconnect_attempts = 1;

// When an IRC connection was successfully registered.
this.registered = false;
Expand All @@ -31,6 +31,7 @@ module.exports = class Connection extends EventEmitter {

registeredSuccessfully() {
this.registered = Date.now();
this.reconnect_attempts = 1;
}

connect(options) {
Expand Down Expand Up @@ -83,7 +84,6 @@ module.exports = class Connection extends EventEmitter {
// Called when the socket is connected and ready to start sending/receiving data.
function socketOpen() {
that.debugOut('Socket fully connected');
that.reconnect_attempts = 0;
that.connected = true;
that.emit('socket connected');
}
Expand Down