Ver código fonte

add TCP Keep Alive support in config

Shelikhoo 4 anos atrás
pai
commit
4cf9992f89
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      infra/conf/cfgcommon/socketcfg/socket.go

+ 2 - 0
infra/conf/cfgcommon/socketcfg/socket.go

@@ -12,6 +12,7 @@ type SocketConfig struct {
 	TProxy               string `json:"tproxy"`
 	AcceptProxyProtocol  bool   `json:"acceptProxyProtocol"`
 	TCPKeepAliveInterval int32  `json:"tcpKeepAliveInterval"`
+	TCPKeepAliveIdle     int32  `json:"tcpKeepAliveIdle"`
 	TFOQueueLength       uint32 `json:"tcpFastOpenQueueLength"`
 }
 
@@ -48,5 +49,6 @@ func (c *SocketConfig) Build() (*internet.SocketConfig, error) {
 		Tproxy:               tproxy,
 		AcceptProxyProtocol:  c.AcceptProxyProtocol,
 		TcpKeepAliveInterval: c.TCPKeepAliveInterval,
+		TcpKeepAliveIdle:     c.TCPKeepAliveIdle,
 	}, nil
 }