-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Description
My current setup is each player has their own connection, this ensures that any actions they do with my inventory system are completed in order - however, my global table of connections can become stale and essentially a memory leak.
'example'
player join:
create sql connection in globals SQL_CONS[ply:SteamID64()]
player disconnect:
SQL_CONS[ply:SteamID64()]:disconnect(true) -- wait for the queue to clear
With the above scenario, SQL_CONS will still maintain an index with an disconnected connection that is not needed.
I have no way of detecting the successful disconnection to clear out the value in the global table - I'm going to write a timer that will check the connections every 10 minutes or so and drop stale references, but it would be nice to clear it out as soon as the queue is empty.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels