geforkt von Mirrors/Velocity
Fix several invalid connection closure issues.
Dieser Commit ist enthalten in:
Ursprung
7b8a215078
Commit
0469aaa03a
@ -32,7 +32,7 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
if (!connection.getPlayer().isActive()) {
|
if (!connection.getPlayer().isActive()) {
|
||||||
// Connection was left open accidentally. Close it so as to avoid "You logged in from another location"
|
// Connection was left open accidentally. Close it so as to avoid "You logged in from another location"
|
||||||
// errors.
|
// errors.
|
||||||
connection.getMinecraftConnection().close();
|
connection.disconnect();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
if (!connection.getPlayer().isActive()) {
|
if (!connection.getPlayer().isActive()) {
|
||||||
// Connection was left open accidentally. Close it so as to avoid "You logged in from another location"
|
// Connection was left open accidentally. Close it so as to avoid "You logged in from another location"
|
||||||
// errors.
|
// errors.
|
||||||
connection.getMinecraftConnection().close();
|
connection.disconnect();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,9 +149,11 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void disconnect() {
|
public void disconnect() {
|
||||||
|
if (minecraftConnection != null) {
|
||||||
minecraftConnection.close();
|
minecraftConnection.close();
|
||||||
minecraftConnection = null;
|
minecraftConnection = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren