add client timeout via net/Conn SetDeadline

This commit is contained in:
Reese Norris
2025-07-06 17:40:11 -07:00
parent 8c49beeb8c
commit 8affb6210e
4 changed files with 14 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ import (
"slices"
"strconv"
"strings"
"time"
)
// FSD error codes
@@ -418,3 +419,8 @@ func sendSendFastPacket(client *Client, enabled bool) {
client.send(builder.String())
}
// getTimeBySecondsInFuture returns time.Now + seconds
func getTimeBySecondsInFuture(seconds int) time.Time {
return time.Now().Add(time.Duration(seconds) * time.Second)
}