Create a room asynchronously
See original GitHub issueAs explain on the Discord, there is an issue when a room is created asynchronously. The issue is that in the unity client, the function GetAvailableRooms() returns all the rooms but without metadatas nor any other param like maxClients.
I link a .zip which contain a reproduction scenario.
I tried with promises promise().then({ CreateRoom })
, with async/await, and I also tried to set OnCreate async and the result is the same.
My aim was to load a configuration file before creating the room, and configure the room from the data loaded.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Write asynchronous DAO queries
This restriction means that you must make your DAO queries asynchronous. The Room library includes integrations with several different ...
Read more >android - Do Room queries happen asynchronously?
The only place where Room does asynchronous stuff is on @Query with a reactive return value (LiveData, Flowable, etc.). There could be issues ......
Read more >Asynchronous queries in Android.
This tutorial is going to be on, how to retrieve a single row from a Room database . I am creating it out...
Read more >44. The Room API asynchronously (AS 3.3) - YouTube
In this video we see how we can run the methods created in our DAO class in an AsyncTask. The Room API must...
Read more >Learning Android's Room Database Made Easy | by Elye
Making it asynchronous. If you recall previously we have allowMainThreadQueries() , which is not ideal. Now just remove it as below. class ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @Lucidarme,
I’ve checked your sources and the problems seems to be because
maxClients
is parsed as string when coming from the XML file. Whereas when you set it manually, it is a number.If you use
parseInt(res.room.maxClients || 6)
it works. I think this is more of a type definition issue, asres.room.maxClients
is interpreted asany
Perhaps we should throw an error if
this.maxClients
is anything other thanNumber
Hi @endel
You are right, and it’s the same thing for publicName, I had to parse it to string to make it work. Yes an explicit error could be fine, it may save lot of time !
Thank you for your help !