mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
删除无用forwarding数据 (#1565)
This commit is contained in:
@@ -3,7 +3,6 @@ local gateserver = require "snax.gateserver"
|
||||
|
||||
local watchdog
|
||||
local connection = {} -- fd -> connection : { fd , client, agent , ip, mode }
|
||||
local forwarding = {} -- agent -> connection
|
||||
|
||||
skynet.register_protocol {
|
||||
name = "client",
|
||||
@@ -41,7 +40,6 @@ end
|
||||
|
||||
local function unforward(c)
|
||||
if c.agent then
|
||||
forwarding[c.agent] = nil
|
||||
c.agent = nil
|
||||
c.client = nil
|
||||
end
|
||||
@@ -76,7 +74,6 @@ function CMD.forward(source, fd, client, address)
|
||||
unforward(c)
|
||||
c.client = client or 0
|
||||
c.agent = address or source
|
||||
forwarding[c.agent] = c
|
||||
gateserver.openclient(fd)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user