fix(join): increase join_world timeout, log dedicated server stdout/stderr, null check multiplayer
checkpoint / checkpoint (push) Successful in 5m49s
checkpoint / checkpoint (push) Successful in 5m49s
This commit is contained in:
@@ -139,10 +139,11 @@ func request(
|
||||
body: String = "",
|
||||
content_type: String = "application/json",
|
||||
require_auth: bool = false,
|
||||
custom_headers: PackedStringArray = PackedStringArray()
|
||||
custom_headers: PackedStringArray = PackedStringArray(),
|
||||
custom_timeout: float = 0.0
|
||||
) -> Dictionary:
|
||||
var http := HTTPRequest.new()
|
||||
http.timeout = timeout_seconds
|
||||
http.timeout = custom_timeout if custom_timeout > 0.0 else timeout_seconds
|
||||
http.max_redirects = 8
|
||||
http.accept_gzip = true
|
||||
add_child(http)
|
||||
@@ -268,7 +269,7 @@ func get_avatar_loadout() -> Dictionary:
|
||||
## its address. On success result.data is {"world_id", "host", "port"}.
|
||||
## 503 if this backend has no game-server orchestration.
|
||||
func join_world(world_id: int) -> Dictionary:
|
||||
return await request(HTTPClient.METHOD_POST, "/api/worlds/%d/join" % world_id, "", "application/json", true)
|
||||
return await request(HTTPClient.METHOD_POST, "/api/worlds/%d/join" % world_id, "", "application/json", true, PackedStringArray(), 25.0)
|
||||
|
||||
|
||||
## Save (replace) the current user's avatar loadout (requires auth).
|
||||
|
||||
@@ -107,7 +107,8 @@ func disconnect_from_server() -> void:
|
||||
peer.close()
|
||||
if _server_root and is_instance_valid(_server_root):
|
||||
_server_root.queue_free()
|
||||
multiplayer.multiplayer_peer = null
|
||||
if multiplayer:
|
||||
multiplayer.multiplayer_peer = null
|
||||
_prediction_buffer.clear()
|
||||
_remote_states.clear()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user