MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / askReconnect

Method askReconnect

src/main/java/Client/Roster.java:1620–1655  ·  view source on GitHub ↗
(final Exception e)

Source from the content-addressed store, hash-verified

1618 }
1619
1620 public void askReconnect(final Exception e) {
1621 //SplashScreen.getInstance().close();
1622 try {
1623 sd.getTheStream().close(); // sends </stream:stream> and closes socket
1624 } catch (Exception e1) { /*
1625 * e1.printStackTrace();
1626 */ }
1627 setProgress(SR.MS_FAILED, 100);
1628 doReconnect = false;
1629 myStatus = Presence.PRESENCE_OFFLINE;
1630 setQuerySign(false);
1631 redraw();
1632
1633 StringBuffer error = new StringBuffer();
1634 if (e.getClass().getName().indexOf("java.lang.Exception") < 0) {
1635 error.append(e.getClass().getName());
1636 error.append('\n');
1637 }
1638 if (e.getMessage() != null) {
1639 error.append(e.getMessage());
1640 }
1641
1642 if (currentReconnect >= cf.reconnectCount) {
1643 errorLog(error.toString());
1644 return;
1645 }
1646
1647 currentReconnect++;
1648
1649 String topBar = "(" + currentReconnect + "/" + cf.reconnectCount + ") Reconnecting";
1650 errorLog(topBar + "\n" + error.toString());
1651
1652 setRotator();
1653 VirtualCanvas.getInstance().rw = new ReconnectWindow();
1654 VirtualCanvas.getInstance().rw.startReconnect();
1655 }
1656
1657 public void doReconnect() {
1658 setProgress(SR.MS_DISCONNECTED, 0);

Callers 2

runMethod · 0.95
connectionTerminatedMethod · 0.80

Calls 13

setProgressMethod · 0.95
setQuerySignMethod · 0.95
errorLogMethod · 0.95
getInstanceMethod · 0.95
getTheStreamMethod · 0.80
appendMethod · 0.80
setRotatorMethod · 0.80
startReconnectMethod · 0.80
getNameMethod · 0.65
closeMethod · 0.45
redrawMethod · 0.45
getMessageMethod · 0.45

Tested by

no test coverage detected