Commit 199729db70a131617dc89fa65f012775193b0606
1 parent
46cff17a
Exists in
master
提交
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/HttpServer/logic/function.go
@@ -1341,7 +1341,7 @@ func HandleRandWorldChat(ntime int) { | @@ -1341,7 +1341,7 @@ func HandleRandWorldChat(ntime int) { | ||
1341 | isInsert := false | 1341 | isInsert := false |
1342 | length, err := redishandler.GetRedisClient().LLen(redis.WORLD_CHAT_INFO_KEY) | 1342 | length, err := redishandler.GetRedisClient().LLen(redis.WORLD_CHAT_INFO_KEY) |
1343 | if err == nil { | 1343 | if err == nil { |
1344 | - if length >= CHATLIMITNUM { | 1344 | + if length >= CHATLIMITNUM-1 { |
1345 | //需要先把多余的聊天记录删除 | 1345 | //需要先把多余的聊天记录删除 |
1346 | delcnt := length - CHATLIMITNUM | 1346 | delcnt := length - CHATLIMITNUM |
1347 | for i := 0; i < delcnt; i++ { | 1347 | for i := 0; i < delcnt; i++ { |