File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change 66 "net"
77 "net/http"
88 "strconv"
9- "syscall"
109 "time"
1110
1211 "github.com/tuihub/librarian/internal/conf"
@@ -59,17 +58,7 @@ func NewConnectServer(
5958
6059func (s * ConnectServer ) Start (ctx context.Context ) error {
6160 lc := net.ListenConfig {
62- Control : func (network , address string , c syscall.RawConn ) error {
63- var err error
64- err2 := c .Control (func (fd uintptr ) {
65- // Enable SO_REUSEADDR for faster restart
66- err = syscall .SetsockoptInt (int (fd ), syscall .SOL_SOCKET , syscall .SO_REUSEADDR , 1 )
67- })
68- if err2 != nil {
69- return err2
70- }
71- return err
72- },
61+ Control : nil ,
7362 KeepAlive : 3 * time .Minute , //nolint:mnd // Enable TCP keep-alive and set idle time
7463 KeepAliveConfig : net.KeepAliveConfig {
7564 Enable : true ,
You can’t perform that action at this time.
0 commit comments