mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
fix(channelserver): add fail ACKs to silent error paths to prevent client softlocks
Handlers that log errors and return without sending a MsgSysAck leave the client waiting indefinitely. Add doAckSimpleFail/doAckBufFail to 14 error paths across 4 files, matching the pattern already used in ~70 other error paths across the codebase. Affected handlers: - handleMsgMhfGetCafeDuration (1 path) - handleMsgMhfSavedata (1 path) - handleMsgMhfArrangeGuildMember (3 paths) - handleMsgMhfEnumerateGuildMember (5 paths) - handleMsgSysLogin (4 paths) - handleMsgSysIssueLogkey (1 path)
This commit is contained in:
@@ -97,6 +97,7 @@ func handleMsgMhfGetCafeDuration(s *Session, p mhfpacket.MHFPacket) {
|
||||
err = s.server.db.QueryRow("SELECT cafe_time FROM characters WHERE id = $1", s.charID).Scan(&cafeTime)
|
||||
if err != nil {
|
||||
s.logger.Error("Failed to get cafe time", zap.Error(err))
|
||||
doAckBufFail(s, pkt.AckHandle, make([]byte, 4))
|
||||
return
|
||||
}
|
||||
if mhfcourse.CourseExists(30, s.courses) {
|
||||
|
||||
Reference in New Issue
Block a user