Skip to content

Commit

Permalink
chore: increase connection read deadline to 10 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
damonto committed May 31, 2024
1 parent b0d59b7 commit f81251c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/cloud/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func useData(conn *Conn, cmd []byte) error {
for i := 1; i <= count; i++ {
var placeholder []byte
if i == count {
placeholder = bytes.Repeat([]byte{0}, 253-len(message)-len(cmd)-6) // -6=finished message tlv + close packet tlv
placeholder = bytes.Repeat([]byte{0}, 253-len(message)-len(cmd)-6)
} else {
placeholder = bytes.Repeat([]byte{0}, 253)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cloud/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (s *server) Listen(address string) error {

conn.SetKeepAlive(true)
conn.SetKeepAlivePeriod(30 * time.Second)
conn.SetReadDeadline(time.Now().Add(5 * time.Minute))
conn.SetReadDeadline(time.Now().Add(10 * time.Minute))

s.wg.Add(1)
go func() {
Expand Down

0 comments on commit f81251c

Please sign in to comment.