Procházet zdrojové kódy

Remove redundant setting of TCP keepalive since it is default

tags/v2.1.3^2
9seconds před 4 roky
rodič
revize
bc3b517e8b
1 změnil soubory, kde provedl 0 přidání a 4 odebrání
  1. 0
    4
      network/sockopts.go

+ 0
- 4
network/sockopts.go Zobrazit soubor

20
 }
20
 }
21
 
21
 
22
 func setCommonSocketOptions(conn *net.TCPConn) error {
22
 func setCommonSocketOptions(conn *net.TCPConn) error {
23
-	if err := conn.SetKeepAlive(true); err != nil {
24
-		return fmt.Errorf("cannot disable TCP keepalive probes: %w", err)
25
-	}
26
-
27
 	if err := conn.SetKeepAlivePeriod(DefaultTCPKeepAlivePeriod); err != nil {
23
 	if err := conn.SetKeepAlivePeriod(DefaultTCPKeepAlivePeriod); err != nil {
28
 		return fmt.Errorf("cannot set time period of TCP keepalive probes: %w", err)
24
 		return fmt.Errorf("cannot set time period of TCP keepalive probes: %w", err)
29
 	}
25
 	}

Načítá se…
Zrušit
Uložit