Its not a problem with my code. All the GRPC requests that need to attached firstly don't not return anything, even in case of error.
Firstly I was thinking that for some reason I only get reply to the first request but it's not a case.
For example, I try do leave a group. It's a php code, but it does not matter, I just want to show the problem. So, to leave a group I send 4 requests:
$response1 = $service->hi(random_int(100000, 999999), $user_agent, $ver, $lang);
echo $response1;
$response2 = $service->logintoken(random_int(100000, 999999), $admin, $passB, $schemaB);
echo $response2;
$response3 = $service->attach(random_int(100000, 999999), $topic,0);
echo $response3;
$response4 = $service->leave(random_int(100000, 999999), $topic, $leave);
echo $response4;
But I only get 3 replies:
$response1
{"id":"767468","code":201,"text":"created"}
$response2
{"id":"673320","code":200,"text":"ok","params":{"token":"InR0UFFNdDVROWF4ckxVdGdIZ0FCQUFFQWZXYlhsbUtCakFOcUUwLysvS2JuVzNKQkswL1FwamtoOVVlM1dYYlAyWEE9Ig==","expires":"IjIwMjEtMDMtMTJUMDg6NTk6MjMuMzM1WiI=","user":"InVzcnR0UFFNdDVROWF3Ig==","authlvl":"InJvb3Qi"}}
$response3
{"id":"935513","topic":"grpcGAejdVSS_I","code":200,"text":"ok"}
$response4
empty
I tried to send a leave request with an invalid topic ID:
$response4 = $service->leave(random_int(100000, 999999), "grpInvalidTopic", $leave);
The same - it does not return anything.
Then I sent a leave request without sending attach request firstly. Now it returns error as it should be:
//$response3 = $service->attach(random_int(100000, 999999), $topic,0);
$response4 = $service->leave(random_int(100000, 999999), "grpInvalidTopic", $leave);
echo $response4
$response4
{"id":"431224","topic":"grpcGAejdVSS_I","code":409,"text":"must attach first"}
So, all the requests like leave, pub etc are being processed successfully or with error but if a request needs to be attached firstly, it does not return anything. There are no errors on the server either.