diff --git a/ice-adapter/src/main/java/com/faforever/iceadapter/debug/DebugWindow.java b/ice-adapter/src/main/java/com/faforever/iceadapter/debug/DebugWindow.java
index 076d8c0..336bf0e 100644
--- a/ice-adapter/src/main/java/com/faforever/iceadapter/debug/DebugWindow.java
+++ b/ice-adapter/src/main/java/com/faforever/iceadapter/debug/DebugWindow.java
@@ -184,6 +184,7 @@ public void peerConnectivityUpdate(Peer peer) {
p.averageRtt.set(connectivityChecker.map(PeerConnectivityCheckerModule::getAverageRTT).orElse(-1.0f).intValue());
p.lastReceived.set(connectivityChecker.map(PeerConnectivityCheckerModule::getLastPacketReceived).map(last -> System.currentTimeMillis() - last).orElse(-1L).intValue());
p.echosReceived.set(connectivityChecker.map(PeerConnectivityCheckerModule::getEchosReceived).orElse(-1L).intValue());
+ p.echosReceived.set(connectivityChecker.map(PeerConnectivityCheckerModule::getEchosReceived).orElse(-1L).intValue());
});
}
});
@@ -213,6 +214,7 @@ public static class DebugPeer {
public SimpleIntegerProperty averageRtt = new SimpleIntegerProperty(-1);
public SimpleIntegerProperty lastReceived = new SimpleIntegerProperty(-1);
public SimpleIntegerProperty echosReceived = new SimpleIntegerProperty(-1);
+ public SimpleIntegerProperty invalidEchosReceived = new SimpleIntegerProperty(-1);
public SimpleStringProperty localCandidate = new SimpleStringProperty("");
public SimpleStringProperty remoteCandidate = new SimpleStringProperty("");
@@ -276,8 +278,14 @@ public int getEchosReceived() {
return echosReceived.get();
}
+ public int getInvalidEchosReceived() {
+ return invalidEchosReceived.get();
+ }
+
public SimpleIntegerProperty echosReceivedProperty() { return echosReceived; }
+ public SimpleIntegerProperty invalidEchosReceivedProperty() { return invalidEchosReceived; }
+
public String getLocalCandidate() {
return localCandidate.get();
}
diff --git a/ice-adapter/src/main/java/com/faforever/iceadapter/debug/DebugWindowController.java b/ice-adapter/src/main/java/com/faforever/iceadapter/debug/DebugWindowController.java
index 74bb361..a3a0699 100644
--- a/ice-adapter/src/main/java/com/faforever/iceadapter/debug/DebugWindowController.java
+++ b/ice-adapter/src/main/java/com/faforever/iceadapter/debug/DebugWindowController.java
@@ -37,6 +37,7 @@ public class DebugWindowController {
public TableColumn rttColumn;
public TableColumn lastColumn;
public TableColumn echosRcvColumn;
+ public TableColumn invalidEchosRcvColumn;
public TableColumn localCandColumn;
public TableColumn remoteCandColumn;
@@ -66,6 +67,7 @@ private void initialize() {
rttColumn.setCellValueFactory(new PropertyValueFactory<>("averageRtt"));
lastColumn.setCellValueFactory(new PropertyValueFactory<>("lastReceived"));
echosRcvColumn.setCellValueFactory(new PropertyValueFactory<>("echosReceived"));
+ invalidEchosRcvColumn.setCellValueFactory(new PropertyValueFactory<>("invalidEchosReceived"));
localCandColumn.setCellValueFactory(new PropertyValueFactory<>("localCandidate"));
remoteCandColumn.setCellValueFactory(new PropertyValueFactory<>("remoteCandidate"));
diff --git a/ice-adapter/src/main/java/com/faforever/iceadapter/ice/PeerConnectivityCheckerModule.java b/ice-adapter/src/main/java/com/faforever/iceadapter/ice/PeerConnectivityCheckerModule.java
index ade26bd..cf0239a 100644
--- a/ice-adapter/src/main/java/com/faforever/iceadapter/ice/PeerConnectivityCheckerModule.java
+++ b/ice-adapter/src/main/java/com/faforever/iceadapter/ice/PeerConnectivityCheckerModule.java
@@ -24,6 +24,7 @@ public class PeerConnectivityCheckerModule {
@Getter private float averageRTT = 0.0f;
@Getter private long lastPacketReceived;
@Getter private long echosReceived = 0;
+ @Getter private long invalidEchosReceived = 0;
public PeerConnectivityCheckerModule(PeerIceModule ice) {
this.ice = ice;
@@ -73,6 +74,7 @@ void echoReceived(byte[] data, int offset, int length) {
if (length != 9) {
log.trace("Received echo of wrong length, length: {}", length);
+ invalidEchosReceived++;
}
int rtt = (int) (System.currentTimeMillis() - Longs.fromByteArray(Arrays.copyOfRange(data, offset + 1, length)));
diff --git a/ice-adapter/src/main/resources/debugWindow.fxml b/ice-adapter/src/main/resources/debugWindow.fxml
index 5bd31b5..21b675c 100644
--- a/ice-adapter/src/main/resources/debugWindow.fxml
+++ b/ice-adapter/src/main/resources/debugWindow.fxml
@@ -63,6 +63,7 @@
+