Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-03 14:50:19 +01:00
Fix direct connection and ensure connecting doesn't block
Dieser Commit ist enthalten in:
Ursprung
bcc68ee4b5
Commit
09fb6bf3ba
@ -58,7 +58,7 @@ public final class LocalSession extends TcpSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void connect() {
|
public void connect(boolean wait) {
|
||||||
if (this.disconnected) {
|
if (this.disconnected) {
|
||||||
throw new IllegalStateException("Connection has already been disconnected.");
|
throw new IllegalStateException("Connection has already been disconnected.");
|
||||||
}
|
}
|
||||||
|
@ -845,7 +845,7 @@ public class GeyserSession implements GeyserConnection, CommandSender {
|
|||||||
// We're going to connect through the JVM and not through TCP
|
// We're going to connect through the JVM and not through TCP
|
||||||
downstream = new LocalSession(this.remoteAddress, this.remotePort,
|
downstream = new LocalSession(this.remoteAddress, this.remotePort,
|
||||||
geyser.getBootstrap().getSocketAddress(), upstream.getAddress().getAddress().getHostAddress(),
|
geyser.getBootstrap().getSocketAddress(), upstream.getAddress().getAddress().getHostAddress(),
|
||||||
this.protocol, this.downstream.getCodecHelper());
|
this.protocol, this.protocol.createHelper());
|
||||||
} else {
|
} else {
|
||||||
downstream = new TcpClientSession(this.remoteAddress, this.remotePort, this.protocol);
|
downstream = new TcpClientSession(this.remoteAddress, this.remotePort, this.protocol);
|
||||||
disableSrvResolving();
|
disableSrvResolving();
|
||||||
@ -1017,7 +1017,7 @@ public class GeyserSession implements GeyserConnection, CommandSender {
|
|||||||
setDaylightCycle(true);
|
setDaylightCycle(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
downstream.connect();
|
downstream.connect(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disconnect(String reason) {
|
public void disconnect(String reason) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren