Increased max listeners on the RPC socket
ci/woodpecker/tag/ociImageTag Pipeline was successful Details

This commit is contained in:
Natty 2024-11-17 19:26:31 +01:00
parent 53123ce7e8
commit 5ff8540b22
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,7 @@ async function getRpcClient(): Promise<Socket> {
}
client = new Socket();
client.setMaxListeners(1024);
const [host, portStr] = config.rpcHost.trim().split(/:(?=[0-9]+$)/, 2);
const port = parseInt(portStr);
@ -94,6 +95,7 @@ async function getRpcClient(): Promise<Socket> {
const reconnectWithBackoff = () => {
client!.destroy();
client = new Socket();
client.setMaxListeners(1024);
setTimeout(() => createClient(client!), 1000 * (1 + Math.pow(1.5, exponentialBackoff)));
};