You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to catch connection errors so that I can display the appropriate error messages on the client side.
Assume the server is currently not available. Two issues I encountered:
What is the proper way to set the connection time out? From the example code, I am using this: ColyseusConnection.config = { connect_timeout = 3 }
However, that does not appear to work correctly. My test script always times out at 10 seconds, even if I specified a different value as above. Looking at the client.lua code I see this: end, headers, body or "", { timeout = 10 })
so it seems like the connection timeout is currently fixed at 10 sec?
I am expecting on:error callback to be called if the server is unavailable, but I am getting script errors on client.lua:
WARNING:DLIB: Profiler Message.Dispatch @__http_worker_0 took 10.004 seconds
ERROR:SCRIPT: /colyseus/client.lua:132: attempt to index local 'data' (a boolean value)
stack traceback:
/colyseus/client.lua:132: in function </colyseus/client.lua:127>
Thoughts?
The text was updated successfully, but these errors were encountered:
Hi @GreenArrow18, I'm gonna check this later today, thanks for letting me know! You can expect the callback to be triggered with and err message filled in.
I'm trying to catch connection errors so that I can display the appropriate error messages on the client side.
Assume the server is currently not available. Two issues I encountered:
ColyseusConnection.config = { connect_timeout = 3 }
However, that does not appear to work correctly. My test script always times out at 10 seconds, even if I specified a different value as above. Looking at the client.lua code I see this:
end, headers, body or "", { timeout = 10 })
so it seems like the connection timeout is currently fixed at 10 sec?
Thoughts?
The text was updated successfully, but these errors were encountered: