Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn command id into global #542

Closed
wants to merge 1 commit into from

Conversation

Jan200101
Copy link
Contributor

@Jan200101 Jan200101 commented Sep 14, 2023

Please tick as appropriate:

  • I have tested this code on a steam deck or on a PC
  • My changes generate no new errors/warnings
  • This is a bugfix/hotfix
  • This is a new feature

If you're wanting to update a translation or add a new one, please use the weblate page: https://weblate.werwolv.net/projects/decky/

Description

the response id is tied to the request id thus multiple instances of the Tab class can cause problems when prior messages are not consumed properly

@AAGaming00
Copy link
Member

this doesn't make sense, iirc different tabs have different sets of ids

@AAGaming00
Copy link
Member

or do they just echo whatever ID we use, that would be fine then

@Jan200101
Copy link
Contributor Author

the format is similar to jsonrpc, the ID I send is the same I receive
This is used to unique identify request and response pairs.

When dealing with multiple different Tab instances this isn't an issue, but when there are multiple Tabs pointing towards the same websocket the same ID is likely to appear since we don't always consume the stream.

@Jan200101
Copy link
Contributor Author

ignore what I said, the format is JSON-RPC 1.0

And with that we should set the ID to None when no response is required to inform the server we don't expect a response

@Jan200101
Copy link
Contributor Author

scratch that, they don't support notifications, only requests.

@TrainDoctor TrainDoctor reopened this Sep 15, 2023
@PartyWumpus PartyWumpus added the enhancement New feature or request label Nov 11, 2023
the response id is tied to the request id thus multiple instances of the Tab class can cause problems when prior messages are not consumed properly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants