Describe the bug
When trying to connect to the league client, the API will wait until the process and lockfile are detected before doing so. This results in successfully parsing the lockfile for the auth token and client port when the client is already open.
However, if the API tries to connect before opening the client, there's a chance that the client hasn't established the web socket server when this API detects both the process and lockfile. This results in an unsuccessful connection to the web socket server, which can only be fixed by instantiating a new ILeagueClientApi after the client is open. This is unacceptable.
To Reproduce
Steps to reproduce the behavior:
Make sure the league client is completely closed (no processes running).
Attempt to connect to the client via await LeagueClientApi.ConnectAsync().
Open the client.
You'll either observe event capturing or the lack of it.
The connection to the client's web socket server should complete and be successful before completing the Task, therefore, the latter is not acceptable.
Expected behaviorawait LeagueClientApi.ConnectAsync() will successfully connect to the client's web socket server before completing.
Describe the bug When trying to connect to the league client, the API will wait until the process and lockfile are detected before doing so. This results in successfully parsing the lockfile for the auth token and client port when the client is already open.
However, if the API tries to connect before opening the client, there's a chance that the client hasn't established the web socket server when this API detects both the process and lockfile. This results in an unsuccessful connection to the web socket server, which can only be fixed by instantiating a new
ILeagueClientApi
after the client is open. This is unacceptable.To Reproduce Steps to reproduce the behavior:
await LeagueClientApi.ConnectAsync()
.The connection to the client's web socket server should complete and be successful before completing the Task, therefore, the latter is not acceptable.
Expected behavior
await LeagueClientApi.ConnectAsync()
will successfully connect to the client's web socket server before completing.