Skip to content

Commit c12bc7f

Browse files
committed
fix: remove unsupported code
1 parent be619d5 commit c12bc7f

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

internal/server/connect.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
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

6059
func (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,

0 commit comments

Comments
 (0)