On client CloseWrite, do CloseWrite instead of Close for backend
Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
This commit is contained in:
parent
401b3afa3b
commit
b55be9fdea
25 changed files with 393 additions and 36 deletions
|
@ -1,7 +1,6 @@
|
|||
package tcp
|
||||
|
||||
import (
|
||||
"net"
|
||||
"sync"
|
||||
|
||||
"github.com/containous/traefik/v2/pkg/log"
|
||||
|
@ -20,7 +19,7 @@ func NewRRLoadBalancer() *RRLoadBalancer {
|
|||
}
|
||||
|
||||
// ServeTCP forwards the connection to the right service
|
||||
func (r *RRLoadBalancer) ServeTCP(conn net.Conn) {
|
||||
func (r *RRLoadBalancer) ServeTCP(conn WriteCloser) {
|
||||
if len(r.servers) == 0 {
|
||||
log.WithoutContext().Error("no available server")
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue