mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #2668 from meirf/set-initial-udp-proxy-timeout
Set initial timeout upon UDP proxy connection creation
This commit is contained in:
commit
50cf0c1b23
@ -226,6 +226,10 @@ func (udp *udpProxySocket) getBackendConn(activeClients *clientCache, cliAddr ne
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err = svrConn.SetDeadline(time.Now().Add(timeout)); err != nil {
|
||||
glog.Errorf("SetDeadline failed: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
activeClients.clients[cliAddr.String()] = svrConn
|
||||
go func(cliAddr net.Addr, svrConn net.Conn, activeClients *clientCache, timeout time.Duration) {
|
||||
defer util.HandleCrash()
|
||||
|
Loading…
Reference in New Issue
Block a user