Hopefully improve autoreconnect a bit more

This commit is contained in:
osmarks 2018-10-05 19:58:14 +01:00
parent 2101cee26e
commit 1e5e2c1165
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ local function send_raw(data, tries)
if not ok then
if tries > 0 then sleep(tries) end
if tries > 5 then error("Max reconnection attempts exceeded. " .. err) end
skynet.connect(true) -- attempt to force reconnect
pcall(skynet.connect, true) -- attempt to force reconnect
send_raw(data, tries + 1)
end
end