1
0
mirror of https://github.com/lxsang/antd-lua-plugin synced 2025-07-23 09:20:05 +02:00

fix bug with the new plugin interface

This commit is contained in:
lxsang
2018-10-07 16:13:55 +02:00
parent 06b2ec0e8f
commit 76e5ca2430
2 changed files with 13 additions and 1 deletions

View File

@ -105,7 +105,7 @@ function std.ws.write_bytes(arr)
std.ws_b(HTTP_REQUEST.id,arr)
end
function std.ws.enable()
return HTTP_REQUEST.query ~= nil and HTTP_REQUEST.query["__web_socket__"] == "1"
return HTTP_REQUEST ~= nil and HTTP_REQUEST.request["__web_socket__"] == "1"
end
function std.ws.close(code)
std.ws_close(HTTP_REQUEST.id,code)