Skip to content

Commit

Permalink
[httputil] return error from keep alive methods within httputil pkg (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
pocockn authored Jun 14, 2022
1 parent 6e1e008 commit 963f1f8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkg/util/httputil/httputil.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ func (ln tcpKeepAliveListener) Accept() (net.Conn, error) {
if err != nil {
return nil, err
}
tc.SetKeepAlive(true)
tc.SetKeepAlivePeriod(3 * time.Minute)

if err = tc.SetKeepAlive(true); err != nil {
return nil, err
}

if err = tc.SetKeepAlivePeriod(3 * time.Minute); err != nil {
return nil, err
}

return tc, nil
}

0 comments on commit 963f1f8

Please sign in to comment.