From 990bede9b2cda869d934fa272bd75ad646a4e3a5 Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Tue, 8 Aug 2017 20:35:45 +0800 Subject: [PATCH] can't setenv more than once --- lualib/skynet.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lualib/skynet.lua b/lualib/skynet.lua index caa07db6..0b16de0b 100644 --- a/lualib/skynet.lua +++ b/lualib/skynet.lua @@ -357,6 +357,7 @@ function skynet.getenv(key) end function skynet.setenv(key, value) + assert(c.command("GETENV",key) == nil, "Can't setenv exist key : " .. key) c.command("SETENV",key .. " " ..value) end