Multiply response possible?

13 views
Skip to first unread message

Maxim

unread,
Aug 7, 2023, 2:11:53 AMAug 7
to Tinode General
Hi Gene, and community!
I detect interesting behavior, when I try to requst sub on topic me by grpc
I got multiply response: 
1. ctrl - 200 ok
2. ctrl - 204 no content

Is it normal behavior?

Gene

unread,
Aug 7, 2023, 2:40:27 AMAug 7
to Tinode General
You don't show your actual request or response, so I have to guess. My guess is you have requested not just {sub}, but {sub:{get:{what:data}} or something like that. The 204 is a response to the get query.

Maxim

unread,
Aug 7, 2023, 3:05:09 AMAug 7
to Tinode General
yea you right!
sub {
  topic: "me"
  get_query {
    what: "sub"
  }
}

Ok, thanks! a lot!

понедельник, 7 августа 2023 г. в 11:40:27 UTC+5, Gene:

Maxim

unread,
Aug 7, 2023, 4:07:46 AMAug 7
to Tinode General
Gene, maybe you have the best practices how managing multiply answers on one group-query request?

понедельник, 7 августа 2023 г. в 12:05:09 UTC+5, Maxim:

Maxim

unread,
Aug 7, 2023, 4:16:36 AMAug 7
to Tinode General
Just, currenlty we make a responsequeue, and make awaits by id key of request. And ofc, this await got first 200 ok return fine. But how to mark sub requests and sync it?

понедельник, 7 августа 2023 г. в 13:07:46 UTC+5, Maxim:

Gene S

unread,
Aug 7, 2023, 4:23:41 AMAug 7
to tin...@googlegroups.com
The API is made explicitly asynchronous. Why do you want to make it synchronous? All the apps we built are asynchronous and work fine.

If you want to make it synchronous, then send requests one by one, i.e. {sub}, then {get} instead of {sub: {get:...}}

--
You received this message because you are subscribed to the Google Groups "Tinode General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tinode+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tinode/75451b51-a4cc-4b40-aa97-12c32179790cn%40googlegroups.com.

Maxim

unread,
Aug 7, 2023, 5:21:49 AMAug 7
to Tinode General
Ahhm ok, I'll reorganize our code. 

понедельник, 7 августа 2023 г. в 13:23:41 UTC+5, Gene:
Reply all
Reply to author
Forward
0 new messages