Fix several invalid connection closure issues.
This commit is contained in:
@@ -32,7 +32,7 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
|
||||
if (!connection.getPlayer().isActive()) {
|
||||
// Connection was left open accidentally. Close it so as to avoid "You logged in from another location"
|
||||
// errors.
|
||||
connection.getMinecraftConnection().close();
|
||||
connection.disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
|
||||
if (!connection.getPlayer().isActive()) {
|
||||
// Connection was left open accidentally. Close it so as to avoid "You logged in from another location"
|
||||
// errors.
|
||||
connection.getMinecraftConnection().close();
|
||||
connection.disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -149,9 +149,11 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
||||
}
|
||||
|
||||
public void disconnect() {
|
||||
if (minecraftConnection != null) {
|
||||
minecraftConnection.close();
|
||||
minecraftConnection = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
Reference in New Issue
Block a user