Commit 9f3043ff authored by nanahira's avatar nanahira

use async

parent e8394e3d
This diff is collapsed.
This diff is collapsed.
......@@ -18,7 +18,7 @@ YGOProMessageHelper = require("./YGOProMessages.js") # 为 SRVPro2 准备的库
translateHandler = (handler) ->
return (buffer, info, datas, params)->
await return handler(buffer, info, params.client, params.server, datas)
await return await handler(buffer, info, params.client, params.server, datas)
@stoc_follow = (proto, synchronous, callback)->
@helper.addHandler("STOC_#{proto}", translateHandler(callback), synchronous, 1)
......
......@@ -30,7 +30,7 @@
translateHandler = function(handler) {
return async function(buffer, info, datas, params) {
return handler(buffer, info, params.client, params.server, datas);
return (await handler(buffer, info, params.client, params.server, datas));
};
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment