mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
perf(channelserver): cache rengoku_data.bin at startup
Load and validate rengoku_data.bin once during server initialization instead of reading it from disk on every client request. The file is static ECD-encrypted config data (~4.9 KB) that never changes at runtime. Validation checks file size and ECD magic bytes, logging a warning if the file is missing or invalid so misconfiguration is caught before any client connects.
This commit is contained in:
@@ -71,8 +71,7 @@ if err != nil {
|
||||
**Pattern C — Fail ACK (correct):** Error logged, explicit fail ACK sent. The client shows an appropriate error dialog and stays connected.
|
||||
|
||||
```go
|
||||
if err != nil {
|
||||
s.logger.Error("Failed to read rengoku_data.bin", zap.Error(err))
|
||||
if data == nil {
|
||||
doAckBufFail(s, pkt.AckHandle, nil)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user