Skip to content

Commit

Permalink
ws_opts
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Nov 10, 2023
1 parent d6f29d1 commit 2528584
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
5 changes: 1 addition & 4 deletions kong/clustering/rpc/connector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ local _M = {}
local _MT = { __index = _M, }


local WS_OPTS = {
timeout = constants.TIMEOUT,
max_payload_len = constants.MAX_PAYLOAD,
}
local WS_OPTS = constants.WS_OPTS


local function connect(conf)
Expand Down
12 changes: 8 additions & 4 deletions kong/clustering/rpc/constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@ local ERROR_CODE = {
}


local WS_OPTS = {
timeout = 5000, -- 5 seconds
max_payload_len = 64 * 1024,
}


local PING_INTERVAL = 30 -- seconds
local PING_WAIT = PING_INTERVAL * 1.5


return {
ERROR_CODE = ERROR_CODE,

JSONRPC_VERSION = "2.0",

TIMEOUT = 5000, -- 5 seconds
WS_OPTS = WS_OPTS,

MAX_PAYLOAD = 64 * 1024,
JSONRPC_VERSION = "2.0",

PING_INTERVAL = PING_INTERVAL,
PING_WAIT = PING_WAIT,
Expand Down

0 comments on commit 2528584

Please sign in to comment.