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

Unsubscribe does not work correctly #34

Open
dlkeng opened this issue Jan 28, 2024 · 1 comment
Open

Unsubscribe does not work correctly #34

dlkeng opened this issue Jan 28, 2024 · 1 comment

Comments

@dlkeng
Copy link

dlkeng commented Jan 28, 2024

Using the "unsub all" command does not actually work!
In the file "Program.cs", it appears that line 1322 never returns to complete the unsubscribe operation.

I found the following changes allow the unsubscribe to work:
Line 1303:
was: static async void Unsubscribe(string param)
change to: static async Task Unsubscribe(string param)

Line 793:
was: if (_subscribers.Count > 0) Unsubscribe("all");
change to: if (_subscribers.Count > 0) await Unsubscribe("all");

Line 790:
was: static void CloseDevice()
change to: static async Task CloseDevice()

Line 742:
was: CloseDevice();
change to: await CloseDevice();

Line 380:
was: Unsubscribe(parameters);
change to: await Unsubscribe(parameters);

Line 334:
was: CloseDevice();
change to: await CloseDevice();

Line 286:
insert: if (_selectedDevice != null) { await CloseDevice(); }

@sensboston
Copy link
Owner

@dlkeng, please provide your changes by the usual way:

  • fork a repo
  • create a new branch
  • implement your changes (please add comments and explanations)
  • commit & issue a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants