implement guild semaphore locking

This commit is contained in:
wish
2023-03-09 17:31:43 +11:00
parent 9a8edf0b64
commit d5dc15fc93
4 changed files with 25 additions and 17 deletions

View File

@@ -186,7 +186,7 @@ func main() {
si := 0
ci := 0
count := 1
for _, ee := range config.ErupeConfig.Entrance.Entries {
for j, ee := range config.ErupeConfig.Entrance.Entries {
for i, ce := range ee.Channels {
sid := (4096 + si*256) + (16 + ci)
c := *channelserver.NewServer(&channelserver.Config{
@@ -202,6 +202,7 @@ func main() {
c.IP = ee.IP
}
c.Port = ce.Port
c.GlobalID = fmt.Sprintf("%02d%02d", j+1, i+1)
err = c.Start()
if err != nil {
preventClose(fmt.Sprintf("Failed to start channel server: %s", err.Error()))