config.name

This commit is contained in:
Cloud Wu
2014-07-13 11:50:30 +08:00
parent 4284cfc372
commit 04cb72d1a8
2 changed files with 3 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ local crypt = require "crypt"
local server = {
host = "127.0.0.1",
port = 8001,
name = "login_master",
}
function server.auth_handler(token)

View File

@@ -112,8 +112,9 @@ local function launch_master(conf)
end
local function login (conf)
local name = conf.name or "login_master"
skynet.start(function()
local loginmaster = datacenter.get "login_master"
local loginmaster = datacenter.get(name)
if loginmaster then
local auth_handler = assert(conf.auth_handler)
launch_master = nil