disconnectReturn only called on first of two connections

Options

We have a connection for realtime and a connection for voice. If both are disconnected, the listener disconnectReturn callback is only triggered on the first disconnection. Is this a bug? SDK Version 5.0.2.0

Answers

  • Kaiserludi
    Options

    Hi @AndrewB.


    Are you calling connect on two different LoadBalancing::Client instances? Otherwise you actually only have one connection and the second disconnect call won't do anything, as the client is already getting disconnected through the first call. Hence no disconnectReturn for the second call would be correct.

    Note that in production you are required to use a Realtime appID for the Realtime and a Voice appID for Voice, so you need a separate Client instances for each and reusing the same for both would be a bug in your code.


    With two separate Client instances I get the correct amount of disconnectReturn() calls, so if you are actually using two separate Client instances, then please provide us with a minimal self-contained repro-case so that we can reproduce the issue.

  • AndrewB
    Options

    We are calling connect on two different LoadBalancing::Client instances, one for Voice and one for Realtime.