Open moradgholi opened 9 years ago
Is there any solution regarding issue #321? I have exactly the same problem... Thanks
yes, i have a same problem.
when i disconnect from server, i get a close callback.
AND i'm sure there is no more re-connect in client code, 'cause i print log at all re-connect function(indeed only one connect function in my code).
AND i'm put a breakpoint in sdk's connect function
private void executeAffinity(final AsyncHttpRequest request, final int redirectCount, final FutureAsyncHttpResponse cancel, final HttpConnectCallback callback)
but no trigger in that code.
BUT meantime i get a reconnect from niginx log with the same client.
i'm so confused. any ideas?
First of all thanks for this really awesome library.
I have 2 questions which all of them are related to each other so please tag this issue as question. 1- please look at this pseudo code :
Is it safe to reconnect android async the close callback gets called ? At this time I see lots of alive connection on server which I think it's not usual. I think after setClosedCallback the websocket connection is still alive or it reconnects again and because of i'm creating multiple connection per client. I saw #235 and created a ping interval request for each 15 seconds to keep the connection alive.
2- It's very important to get the close error code which is referenced in #321, is there anyway to handle this ? I'm sending an error code when i'm closing a client connection to tell the token is not valid and the client should renew the token, as you can see in the code by default i'm getting a new token before initializing a new socket connection to make sure that the token is valid which is not standard.
Thanks