Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-24 15:20:35 +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) {
|
||||
new Bootstrap()
|
||||
Bootstrap bootstrap = new Bootstrap()
|
||||
.channel(datagramChannelClass)
|
||||
.group(this.workerGroup)
|
||||
.handler(new GS4QueryHandler())
|
||||
.localAddress(hostname, port)
|
||||
.bind()
|
||||
.localAddress(hostname, port);
|
||||
bootstrap.bind()
|
||||
.addListener((ChannelFutureListener) future -> {
|
||||
final Channel channel = future.channel();
|
||||
if (future.isSuccess()) {
|
||||
this.endpoints.add(channel);
|
||||
logger.info("Listening for GS4 query on {}", channel.localAddress());
|
||||
} 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