网路库加载失败不会报错
This commit is contained in:
@@ -152,17 +152,23 @@ do--dumpTable
|
|||||||
end
|
end
|
||||||
do--httpRequest
|
do--httpRequest
|
||||||
client=LOADLIB("NETlib")
|
client=LOADLIB("NETlib")
|
||||||
function httpRequest(tick,url,method)
|
if client then
|
||||||
local task,err=client.httpraw{
|
function httpRequest(tick,url,method)
|
||||||
url=url,
|
local task,err=client.httpraw{
|
||||||
method=method or"GET",
|
url=url,
|
||||||
-- header={},
|
method=method or"GET",
|
||||||
-- body="",
|
-- header={},
|
||||||
}
|
-- body="",
|
||||||
if task then
|
}
|
||||||
TASK.new(tick,{task=task,time=0})
|
if task then
|
||||||
else
|
TASK.new(tick,{task=task,time=0})
|
||||||
LOG.print("NETlib error: "..err,"warn")
|
else
|
||||||
|
LOG.print("NETlib error: "..err,"warn")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
function httpRequest(tick,url,method)
|
||||||
|
LOG.print("[NO NETlib]",5,color.yellow)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user