mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-26 17:43:21 +01:00
refactor(channelserver): extract UserBinaryStore and MinidataStore
The userBinary and minidata maps with their locks were spread across Server as raw fields with manual lock management. Cross-channel session searches also required acquiring nested locks (server lock + binary lock). Encapsulating in dedicated types eliminates the nested locking and reduces Server's field count by 4.
This commit is contained in:
@@ -507,7 +507,7 @@ func TestSaveLoad_CompleteSaveLoadCycle(t *testing.T) {
|
||||
s2 := createTestSession(mock2)
|
||||
s2.charID = charID
|
||||
SetTestDB(s2.server, db)
|
||||
s2.server.userBinaryParts = make(map[userBinaryPartID][]byte)
|
||||
s2.server.userBinary = NewUserBinaryStore()
|
||||
|
||||
// Load character data
|
||||
loadPkt := &mhfpacket.MsgMhfLoaddata{
|
||||
|
||||
Reference in New Issue
Block a user