Close packet output stream before saving replay
Aside from being best practice, this is necessary for the recording CRC to be written to the replay file (cause that only happens on close). Also potentially fixes https://github.com/ReplayMod/ReplayMod/issues/144 though that should already be covered by ZipReplayFile tracking and closing all of its `OutputStream`s before saving.
This commit is contained in:
@@ -233,6 +233,11 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
||||
} catch (InterruptedException e) {
|
||||
logger.error("Waiting for save service termination:", e);
|
||||
}
|
||||
try {
|
||||
packetOutputStream.close();
|
||||
} catch (IOException e) {
|
||||
logger.error("Failed to close packet output stream:", e);
|
||||
}
|
||||
|
||||
synchronized (replayFile) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user