Don't set keep alive period

This commit is contained in:
Sketch 2023-11-05 17:04:57 -05:00
parent 90f706c0b6
commit 10ab727bbb
3 changed files with 1 additions and 19 deletions

View File

@ -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",

View File

@ -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
}

View File

@ -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