升级task模块和使用模块的网络相关函数,ws连接任务不再与未完成的http请求冲突
This commit is contained in:
@@ -28,7 +28,6 @@ local function task_enterRoom(task)
|
||||
end
|
||||
end
|
||||
local function enterRoom(roomID)
|
||||
coroutine.yield()
|
||||
wsConnect(
|
||||
task_enterRoom,
|
||||
PATH.socket..PATH.onlinePlay..
|
||||
@@ -72,7 +71,7 @@ local function task_createRoom(task)
|
||||
local res=json.decode(response.body)
|
||||
if response.code==200 and res.message=="OK"then
|
||||
LOG.print(text.createRoomSuccessed)
|
||||
TASK.newNet(enterRoom,res.room.id)
|
||||
enterRoom(res.room.id)
|
||||
else
|
||||
LOG.print(text.httpCode..response.code..": "..res.message,"warn")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user