From 085fd4ac9704557691789c8671bec2af83662844 Mon Sep 17 00:00:00 2001 From: UUBulb <35923940+uubulb@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:52:10 +0800 Subject: [PATCH] fix: allocate memory for geoip struct of new server instance (#530) --- service/singleton/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/service/singleton/server.go b/service/singleton/server.go index 25a938f..d6e3478 100644 --- a/service/singleton/server.go +++ b/service/singleton/server.go @@ -31,6 +31,7 @@ func loadServers() { innerS := s innerS.Host = &model.Host{} innerS.State = &model.HostState{} + innerS.GeoIP = new(model.GeoIP) innerS.TaskCloseLock = new(sync.Mutex) ServerList[innerS.ID] = &innerS ServerUUIDToID[innerS.UUID] = innerS.ID