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

GetDeviceLabelAsync doesn't work #9

Closed
johndcollins opened this issue Jul 10, 2020 · 5 comments
Closed

GetDeviceLabelAsync doesn't work #9

johndcollins opened this issue Jul 10, 2020 · 5 comments

Comments

@johndcollins
Copy link

I'm trying the get the label of the device instead of just the Hostname, but the call to GetDeviceLabelAsync doesn't work. It just hangs and never returns.

@johndcollins
Copy link
Author

I changed the method to async and I got it to work. Not sure why it didn't work with a non async method.

@dotMorten
Copy link
Owner

@johndcollins glad you got it working but what to you mean a non-async method? The method is async

@johndcollins
Copy link
Author

johndcollins commented Jul 11, 2020

I meant from a non async function. I tried to use it with the .Result after and it never returned. Same happens on the other functions.

@dotMorten
Copy link
Owner

Yes don't ever use Task.Result in a multi threaded app. It can deadlock the application (as is likely what happened here)

@johndcollins
Copy link
Author

Ok, good to know. Thanks. In my list I wanted to show the Label of the light instead of the hostname.

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