Closed mohitj13 closed 4 years ago
Reconnect fails, please provide the alternative solution for this application, how to reconnect dynamically.
@chandu1988 This does not fix the disconnection but it tries to successfully reconnects when gets a disconnect message, as it does not stop the httpClient and just reconnect the Bayeux client only.
This does not fix the disconnection but it tries to successfully reconnects when gets a disconnect message, as it does not stop the httpClient and just reconnect the Bayeux client only can u please provided the sample code?
can u please provided the sample code for reconnecting dynamically using httpClient and just reconnect the Bayeux client ?
@chandu1988 this pr changes is all about that only. Look on the commits of this PR you can find the answer.
@Override
public void onMessage(ClientSessionChannel channel, Message message) {
if (!message.isSuccessful()) {
if (isError(message, ERROR_401) || isError(message, ERROR_403)) {
reauthenticate.set(true);
// stop(); this has been removed with disconnect method call
disconnect();
reconnect();
}
}
@chandu1988 this pr changes is all about that only. Look on the commits of this PR you can find the answer.
@Override public void onMessage(ClientSessionChannel channel, Message message) { if (!message.isSuccessful()) { if (isError(message, ERROR_401) || isError(message, ERROR_403)) { reauthenticate.set(true); // stop(); this has been removed with disconnect method call disconnect(); reconnect(); } }
can u please provided the sample code for reconnecting dynamically using httpClient and just reconnect the Bayeux client where i can implement this code please let me know.. how can i refer this method can u please provide the code ...
fix: Not closing the httpClient after getting 401 error instead disconnecting the Bayeux client only chore: Updating the cometd library