-
Notifications
You must be signed in to change notification settings - Fork 89
Description
nakama-godot: v3.4.0
nakama: v3.29.0
Problem:
When sending data via socket.send_match_state_async(), a memory leak occurs. You can see this if you open the Debugger - Monitors section and look at the Objects value, which will increase proportionally to the number of socket.send_match_state_async() calls.
Cause:
The nakama-godot addon internally calls _send_async(), which creates an object _requests[id] = AsyncRequest.new(id, p_parse_type, p_ns, p_result_key), which should be deleted when calling _resume_request(), but this call does not occur, because the client receives a response from the server and calls _received when reading var cid = dict.get("cid") and gets cid = null.
That's why request objects accumulate and are not deleted.
It is worth answering that when sending a message to the server inside the _send_async call, it is clear that different numbers are substituted as the cid value for each call (i.e. everything is fine when sending data).