diff --git a/gpcm/main.go b/gpcm/main.go index d59339d..cf2bd41 100644 --- a/gpcm/main.go +++ b/gpcm/main.go @@ -10,7 +10,6 @@ import ( "io" "net" "sync" - "time" "wwfc/common" "wwfc/database" "wwfc/logging" @@ -110,11 +109,6 @@ func handleRequest(conn net.Conn) { logging.Notice(session.ModuleName, "Unable to set keepalive (1):", err.Error()) } - err = conn.(*net.TCPConn).SetKeepAlivePeriod(time.Hour * 1000) - if err != nil { - logging.Notice(session.ModuleName, "Unable to set keepalive (2):", err.Error()) - } - payload := common.CreateGameSpyMessage(common.GameSpyCommand{ Command: "lc", CommandValue: "1", diff --git a/gpsp/main.go b/gpsp/main.go index 8f3645f..76b495a 100644 --- a/gpsp/main.go +++ b/gpsp/main.go @@ -11,7 +11,6 @@ import ( "net" "strconv" "strings" - "time" "wwfc/common" "wwfc/database" "wwfc/logging" @@ -73,11 +72,6 @@ func handleRequest(conn net.Conn) { logging.Notice(moduleName, "Unable to set keepalive:", err.Error()) } - err = conn.(*net.TCPConn).SetKeepAlivePeriod(time.Hour * 1000) - if err != nil { - logging.Notice(moduleName, "Unable to set keepalive:", err.Error()) - } - logging.Notice(moduleName, "Connection established from", aurora.BrightCyan(conn.RemoteAddr())) // Here we go into the listening loop @@ -174,7 +168,7 @@ func handleOthersList(moduleName string, profileId uint32, command common.GameSp opidsSplit = append(opidsSplit, opids) } - if len(opidsSplit) != numOpidsValue { + if len(opidsSplit) != numOpidsValue && opids != "0" { logging.Error(moduleName, "Mismatch opids length with numopids:", aurora.Cyan(len(opidsSplit)), "!=", aurora.Cyan(numOpidsValue)) return empty } diff --git a/serverbrowser/main.go b/serverbrowser/main.go index 7e0c3f0..7a370ab 100644 --- a/serverbrowser/main.go +++ b/serverbrowser/main.go @@ -11,7 +11,6 @@ import ( "io" "net" "os" - "time" "wwfc/common" "wwfc/logging" ) @@ -90,11 +89,6 @@ func handleRequest(conn net.Conn) { logging.Notice(ModuleName, "Unable to set keepalive", err.Error()) } - err = conn.(*net.TCPConn).SetKeepAlivePeriod(time.Hour * 1000) - if err != nil { - logging.Notice(ModuleName, "Unable to set keepalive", err.Error()) - } - logging.Notice(ModuleName, "Connection established from", aurora.BrightCyan(conn.RemoteAddr())) // Here we go into the listening loop