1
0
mirror of https://github.com/containous/traefik.git synced 2024-12-23 17:34:13 +03:00

Merge branch v2.11 into v3.0

This commit is contained in:
kevinpollet 2024-04-18 15:34:01 +02:00
commit a6b00608d2
No known key found for this signature in database
GPG Key ID: 0C9A5DDD1B292453

View File

@ -100,6 +100,11 @@ func (r *Router) ServeTCP(conn tcp.WriteCloser) {
// If there is a handler matching the connection metadata,
// we let it handle the connection.
if handler != nil {
// Remove read/write deadline and delegate this to underlying TCP server.
if err := conn.SetDeadline(time.Time{}); err != nil {
log.Error().Err(err).Msg("Error while setting deadline")
}
handler.ServeTCP(conn)
return
}
@ -128,15 +133,9 @@ func (r *Router) ServeTCP(conn tcp.WriteCloser) {
return
}
// Remove read/write deadline and delegate this to underlying tcp server (for now only handled by HTTP Server)
err = conn.SetReadDeadline(time.Time{})
if err != nil {
log.Error().Err(err).Msg("Error while setting read deadline")
}
err = conn.SetWriteDeadline(time.Time{})
if err != nil {
log.Error().Err(err).Msg("Error while setting write deadline")
// Remove read/write deadline and delegate this to underlying TCP server (for now only handled by HTTP Server)
if err := conn.SetDeadline(time.Time{}); err != nil {
log.Error().Err(err).Msg("Error while setting deadline")
}
connData, err := tcpmuxer.NewConnData(hello.serverName, conn, hello.protos)