network bug workaround test

This commit is contained in:
Sen 2025-05-21 18:45:45 +02:00
parent f6b2fdf422
commit 41fae1317f
4 changed files with 13 additions and 2 deletions

View file

@ -1613,6 +1613,7 @@ public class Client implements IThreadListener {
}
catch (Exception exception)
{
Log.SYSTEM.error(exception, "Fehler beim sofortigen Ausführen von Render-Task " + callableToSchedule);
return Futures.immediateFailedFuture(exception);
}
}
@ -2577,7 +2578,7 @@ public class Client implements IThreadListener {
Client.this.soundManager.stopSounds();
}
});
this.registerDebug(Keysym.Q, "Programm sofort beenden und speichern", new DebugRunner() {
this.registerDebug(Keysym.Q, "Programm sofort beenden und trennen", new DebugRunner() {
public void execute(Keysym key) {
Client.this.interrupted = true;
}
@ -2617,6 +2618,13 @@ public class Client implements IThreadListener {
}
}
});
this.registerDebug(Keysym.AE, "Programm sofort beenden und server beenden", new DebugRunner() {
public void execute(Keysym key) {
if(Client.this.player != null)
Client.this.player.client.addToSendQueue(new CPacketMessage(CPacketMessage.Type.COMMAND, "shutdown"));
Client.this.interrupted = true;
}
});
}
private boolean handleDebugKey(Keysym key) {

View file

@ -22,7 +22,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet>
// if (Log.isTraceEnabled())
// {
// Log.debug("AUS: [" + p_encode_1_.channel().attr(NetConnection.ATTR_STATE).get() + ":" + integer + "] " + p_encode_2_.getClass().getName());
// Log.SYSTEM.debug("AUS: [" + p_encode_1_.channel().attr(NetConnection.ATTR_STATE).get() + ":" + integer + "] " + p_encode_2_.getClass().getName());
// }
if (integer == null)

View file

@ -10,9 +10,11 @@ public class LPacketLogin implements Packet<ILoginHandler> {
}
public void readPacketData(PacketBuffer buf) throws IOException {
buf.readStringFromBuffer(16);
}
public void writePacketData(PacketBuffer buf) throws IOException {
buf.writeString("TESTtestPlceHldr");
}
public void processPacket(ILoginHandler handler) {

View file

@ -763,6 +763,7 @@ public final class Server implements IThreadListener {
return Futures.<V>immediateFuture(callable.call());
}
catch(Exception exception) {
Log.SYSTEM.error(exception, "Fehler beim sofortigen Ausführen von Server-Task " + callable);
return Futures.immediateFailedFuture(exception);
}
}