Skip to content

Commit bc09c8e

Browse files
Add some comments about the new legacy ping passthrough code.
1 parent 148c2ca commit bc09c8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ private CompletableFuture<ServerPing> attemptPingPassthrough(VelocityInboundConn
8484

8585
CompletableFuture<List<ServerPing>> pingResponses = CompletableFutures.successfulAsList(pings,
8686
(ex) -> fallback);
87+
// Use the new ping passthrough mode if enabled.
8788
if (mode.enabled()) {
8889
return pingResponses.thenApply(responses -> {
8990
// Find the first non-fallback. If it includes a modlist, add it too.
@@ -142,6 +143,7 @@ private CompletableFuture<ServerPing> attemptPingPassthrough(VelocityInboundConn
142143
return fallback;
143144
});
144145
} else {
146+
// Otherwise, use the legacy ping passthrough mode.
145147
switch (legacyMode) {
146148
case ALL:
147149
return pingResponses.thenApply(responses -> {

0 commit comments

Comments
 (0)