bugfix ltls init #1314 (#1318)

* bugfix ltls init #1314

* 修改init失败信息

* fix destructor

Co-authored-by: zixun <lvzxiun@gmail.com>
This commit is contained in:
子熏
2021-01-11 15:15:25 +08:00
committed by GitHub
parent b164e3a8a9
commit c0e3421462
2 changed files with 42 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
local skynet = require "skynet"
local harbor = require "skynet.harbor"
local service = require "skynet.service"
require "skynet.manager" -- import skynet.launch, ...
skynet.start(function()
@@ -39,6 +40,15 @@ skynet.start(function()
skynet.name("DATACENTER", datacenter)
end
skynet.newservice "service_mgr"
local enablessl = skynet.getenv "enablessl"
if enablessl then
service.new("ltls_holder", function ()
local c = require "ltls.init.c"
c.constructor()
end)
end
pcall(skynet.newservice,skynet.getenv "start" or "main")
skynet.exit()
end)