Skip to content

Commit e75f29b

Browse files
committed
increase loogging, dead socket, invalid packets, echo req
1 parent e65e501 commit e75f29b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ice-adapter/src/main/java/com/faforever/iceadapter/ice/PeerConnectivityCheckerModule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ private void checkerThread() {
9999
}
100100

101101
if (System.currentTimeMillis() - lastPacketReceived > 10000) {
102+
log.warn("Didn't receive any answer to echo requests for the past 10 seconds from {}, aborting connection", ice.getPeer().getRemoteLogin());
102103
new Thread(ice::onConnectionLost).start();
103104
return;
104105
}

ice-adapter/src/main/java/com/faforever/iceadapter/ice/PeerIceModule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,11 @@ public void listener() {
428428
sendViaIce(data, 0, packet.getLength());//Turn around, send echo back
429429
}
430430
} else {
431-
log.warn(getLogPrefix() + "Received invalid packet, first byte: 0x{}", data[0]);
431+
log.warn(getLogPrefix() + "Received invalid packet, first byte: 0x{}, length: {}", data[0], packet.getLength());
432432
}
433433

434434
} catch (IOException e) {//TODO: nullpointer from localComponent.xxxx????
435-
log.warn(getLogPrefix() + "Error while reading from ICE adapter");
435+
log.warn(getLogPrefix() + "Error while reading from ICE adapter", e);
436436
if(component == localComponent) {
437437
onConnectionLost();
438438
}

0 commit comments

Comments
 (0)