Skip to content

Connect event doesn't fire on a pre-existing client process #63

@Metainy

Description

@Metainy

When using the LeagueClient class with the client already running, connect event doesn't fire.
With the app running I have to shutdown the client and reopen it for the event to fire.

I am just wondering if this is the default behavior or am I missing something here.

Package Version: v5.3.1
Environment: Vue CLI Plugin Electron Builder
Node: v16.14
Electron: v13

Note:
I am using the library as an external library in electron-builder config, not doing so will throw an error about riotgames.pem location. So by setting the package as a native dependency it solves the issue or I can copy the file to my project directory, but I don't think that's the issue here.

I am using the example code from the documentation

import { authenticate, LeagueClient } from "league-connect";

const credentials = await authenticate();
const client = new LeagueClient(credentials);

client.on("connect", (newCredentials) => {
  
  console.log("Client connected");
});

client.on('disconnect', () => {

});

client.start();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions