Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Fix GS4 "can't bind to null" error.
Dieser Commit ist enthalten in:
Ursprung
fe79c66171
Commit
3e0df79c98
@ -128,19 +128,19 @@ public final class ConnectionManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void queryBind(final String hostname, final int port) {
|
public void queryBind(final String hostname, final int port) {
|
||||||
new Bootstrap()
|
Bootstrap bootstrap = new Bootstrap()
|
||||||
.channel(datagramChannelClass)
|
.channel(datagramChannelClass)
|
||||||
.group(this.workerGroup)
|
.group(this.workerGroup)
|
||||||
.handler(new GS4QueryHandler())
|
.handler(new GS4QueryHandler())
|
||||||
.localAddress(hostname, port)
|
.localAddress(hostname, port);
|
||||||
.bind()
|
bootstrap.bind()
|
||||||
.addListener((ChannelFutureListener) future -> {
|
.addListener((ChannelFutureListener) future -> {
|
||||||
final Channel channel = future.channel();
|
final Channel channel = future.channel();
|
||||||
if (future.isSuccess()) {
|
if (future.isSuccess()) {
|
||||||
this.endpoints.add(channel);
|
this.endpoints.add(channel);
|
||||||
logger.info("Listening for GS4 query on {}", channel.localAddress());
|
logger.info("Listening for GS4 query on {}", channel.localAddress());
|
||||||
} else {
|
} else {
|
||||||
logger.error("Can't bind to {}", channel.localAddress(), future.cause());
|
logger.error("Can't bind to {}", bootstrap.config().localAddress(), future.cause());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren