Skip to content

Commit

Permalink
Fix pooling configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed Jul 25, 2023
1 parent 32324c2 commit 4a2f507
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/1752.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ensure QUIT messages are always sent.
9 changes: 8 additions & 1 deletion src/pool-service/RedisIrcConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ export type RedisIrcConnectionEvents = {

export class RedisIrcConnection extends (EventEmitter as unknown as
new () => TypedEmitter<RedisIrcConnectionEvents&IrcConnectionEventsMap>) implements IrcConnection {
private readonly log = new Logger(`RedisIrcConnection:${this.clientId}`);
private readonly log: Logger;

public get connecting() {
return this.isConnecting;
}

public get readyState() {
// TODO: Should this be just pulled directly from the socket.
// No support for readonly / writeonly.
return this.isConnecting ? 'opening' : 'open';
}

private isConnecting = true;
public localPort?: number;
public localIp?: string;
Expand All @@ -25,6 +31,7 @@ export class RedisIrcConnection extends (EventEmitter as unknown as
public readonly clientId: ClientId,
public state: IrcClientState) {
super();
this.log = new Logger(`RedisIrcConnection:${this.clientId}`);
this.once('connect', () => {
this.isConnecting = false;
});
Expand Down

0 comments on commit 4a2f507

Please sign in to comment.