Skip to content

Commit 918553e

Browse files
committed
更新bee
1 parent 4e95b07 commit 918553e

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

3rd/bee.lua

extension/script/backend/bootstrap.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ local channel = require "bee.channel"
44
local m = {}
55

66
local function hasMaster()
7-
local ok = pcall(channel.query, "DbgMaster")
8-
return ok
7+
return channel.query "DbgMaster" ~= nil
98
end
109

1110
local function initMaster(rootpath, address)

extension/script/backend/master/mgr.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ end
4343

4444
function mgr.init(io)
4545
socket = io
46-
masterThread = channel.query 'DbgMaster'
46+
masterThread = assert(channel.query 'DbgMaster')
4747
socket.event_close(event_close)
4848
return true
4949
end

extension/script/backend/worker.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ local CMD = {}
3636
local WorkerIdent = tostring(thread.id)
3737
local WorkerChannel = ('DbgWorker(%s)'):format(WorkerIdent)
3838

39-
local masterThread = channel.query 'DbgMaster'
39+
local masterThread = assert(channel.query 'DbgMaster')
4040
local workerThread = channel.create(WorkerChannel)
4141

4242
local function workerThreadUpdate(timeout)

0 commit comments

Comments
 (0)