From 77f407119112d0bd404cdd24a6262f50795209ee Mon Sep 17 00:00:00 2001 From: David Feng Date: Mon, 18 Jan 2016 11:56:25 +0800 Subject: [PATCH 1/2] remove unused local variables --- lualib/skynet/debug.lua | 2 -- lualib/snax/hotfix.lua | 3 --- 2 files changed, 5 deletions(-) diff --git a/lualib/skynet/debug.lua b/lualib/skynet/debug.lua index 635bdb31..79c51ad1 100644 --- a/lualib/skynet/debug.lua +++ b/lualib/skynet/debug.lua @@ -1,6 +1,4 @@ -local io = io local table = table -local debug = debug return function (skynet, export) diff --git a/lualib/snax/hotfix.lua b/lualib/snax/hotfix.lua index 3a6e4e3e..f56a5072 100644 --- a/lualib/snax/hotfix.lua +++ b/lualib/snax/hotfix.lua @@ -1,7 +1,4 @@ local si = require "snax.interface" -local io = io - -local hotfix = {} local function envid(f) local i = 1 From d34b092cdd3bf0cfe707c0dcc5829eb09b2a4f99 Mon Sep 17 00:00:00 2001 From: David Feng Date: Fri, 22 Jan 2016 10:28:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?remotedebug.lua=20call=20skynet.timeout()?= =?UTF-8?q?=20only=20in=20debug=20hook=20=E5=AE=9A=E6=97=B6=E5=99=A8?= =?UTF-8?q?=E5=9C=A8debug=E7=BB=93=E6=9D=9F=E5=90=8E=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lualib/skynet/remotedebug.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lualib/skynet/remotedebug.lua b/lualib/skynet/remotedebug.lua index 1fa04155..ccb4f8f9 100644 --- a/lualib/skynet/remotedebug.lua +++ b/lualib/skynet/remotedebug.lua @@ -244,7 +244,9 @@ local function hook_dispatch(dispatcher, resp, fd, channel) func = replace_upvalue(dispatcher, HOOK_FUNC, hook) if func then local function idle() - skynet.timeout(10,idle) -- idle every 0.1s + if raw_dispatcher then + skynet.timeout(10,idle) -- idle every 0.1s + end end skynet.timeout(0, idle) end