mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 06:32:42 +00:00
Expose min/max time between websocket reconnects
This commit is contained in:
parent
d1e02cc3c1
commit
93fb40ad7d
@ -55,7 +55,19 @@ int WebSocket_new(lua_State* L)
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
int type = lua_getfield(L, 1, "onreceive");
|
||||
int type = lua_getfield(L, 1, "minreconnectwait");
|
||||
if (type == LUA_TNUMBER) {
|
||||
ws->setMinWaitBetweenReconnectionRetries(lua_tointeger(L, -1));
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
type = lua_getfield(L, 1, "maxreconnectwait");
|
||||
if (type == LUA_TNUMBER) {
|
||||
ws->setMaxWaitBetweenReconnectionRetries(lua_tointeger(L, -1));
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
type = lua_getfield(L, 1, "onreceive");
|
||||
if (type == LUA_TFUNCTION) {
|
||||
int onreceiveRef = luaL_ref(L, LUA_REGISTRYINDEX);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user