Skip to content

Commit

Permalink
fix cluster timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
sniper00 committed Nov 12, 2024
1 parent 9b21208 commit eadad66
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions service/cluster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,10 @@ local function cluster_service()
for _,senders in pairs(send_watch) do
for key, t in pairs(senders) do
if moon.time() - t > 10 then
local sender = key&0xFFFFFFFF
local sessionid = (key>>32)
local arr = string.split(key,"-")
local sessionid = tonumber(arr[1])
local sender = tonumber(arr[2])
---@diagnostic disable-next-line: param-type-mismatch
moon.response("lua", sender, -sessionid, false, "cluster:socket read timeout")
senders[key] = nil
end
Expand Down

0 comments on commit eadad66

Please sign in to comment.