mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix direct connection and ensure connecting doesn't block
This commit is contained in:
parent
bcc68ee4b5
commit
09fb6bf3ba
2 changed files with 3 additions and 3 deletions
|
@ -58,7 +58,7 @@ public final class LocalSession extends TcpSession {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void connect() {
|
||||
public void connect(boolean wait) {
|
||||
if (this.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
|
||||
downstream = new LocalSession(this.remoteAddress, this.remotePort,
|
||||
geyser.getBootstrap().getSocketAddress(), upstream.getAddress().getAddress().getHostAddress(),
|
||||
this.protocol, this.downstream.getCodecHelper());
|
||||
this.protocol, this.protocol.createHelper());
|
||||
} else {
|
||||
downstream = new TcpClientSession(this.remoteAddress, this.remotePort, this.protocol);
|
||||
disableSrvResolving();
|
||||
|
@ -1017,7 +1017,7 @@ public class GeyserSession implements GeyserConnection, CommandSender {
|
|||
setDaylightCycle(true);
|
||||
}
|
||||
|
||||
downstream.connect();
|
||||
downstream.connect(false);
|
||||
}
|
||||
|
||||
public void disconnect(String reason) {
|
||||
|
|
Loading…
Reference in a new issue