Skip to content

Commit

Permalink
refactor: remove explicit enabling of keepalive for tcp
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed Jun 24, 2024
1 parent c4d9214 commit e8cb8a9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cmd/outline-ss-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,7 @@ func (s *SSServer) startPort(portNum int) error {
packetHandler := service.NewPacketHandler(s.natTimeout, port.cipherList, s.m)
s.ports[portNum] = port
accept := func() (transport.StreamConn, error) {
conn, err := listener.AcceptTCP()
if err == nil {
conn.SetKeepAlive(true)
}
return conn, err
return listener.AcceptTCP()
}
go service.StreamServe(accept, tcpHandler.Handle)
go packetHandler.Handle(port.packetConn)
Expand Down

0 comments on commit e8cb8a9

Please sign in to comment.