@Override public void run() { listener.onDisconnected(); reconnect(); } });
public void onFailure(Throwable value) { // Socket failure, should we try to reconnect? if( !disconnected && tryReconnect() ) { reconnect(this); } else { // nope. cb.onFailure(value); } } }
void handleSessionFailure(Throwable error) { // Socket failure, should we try to reconnect? if( !disconnected && (mqtt.reconnectAttemptsMax<0 || reconnects < mqtt.reconnectAttemptsMax ) ) { mqtt.tracer.debug("Reconnecting transport"); // Cleanup the previous transport. if(heartBeatMonitor!=null) { heartBeatMonitor.stop(); heartBeatMonitor = null; } final Transport t = transport; transport = null; if(t!=null) { t.stop(new Task() { @Override public void run() { listener.onDisconnected(); reconnect(); } }); } else { reconnect(); } } else { // nope. handleFatalFailure(error); } }
@Override public void run() { listener.onDisconnected(); reconnect(); } });
public void onFailure(Throwable value) { // Socket failure, should we try to reconnect? if( !disconnected && tryReconnect() ) { reconnect(this); } else { // nope. cb.onFailure(value); } } }
void handleSessionFailure(Throwable error) { // Socket failure, should we try to reconnect? if( !disconnected && (mqtt.reconnectAttemptsMax<0 || reconnects < mqtt.reconnectAttemptsMax ) ) { mqtt.tracer.debug("Reconnecting transport"); // Cleanup the previous transport. if(heartBeatMonitor!=null) { heartBeatMonitor.stop(); heartBeatMonitor = null; } final Transport t = transport; transport = null; if(t!=null) { t.stop(new Task() { @Override public void run() { listener.onDisconnected(); reconnect(); } }); } else { reconnect(); } } else { // nope. handleFatalFailure(error); } }