Skip to content

Commit

Permalink
fix: use io.EOF error when no backend connections are available
Browse files Browse the repository at this point in the history
This better mimicks gRPC behavior when attempting to send on a
connection when receiver closes the connection.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Mar 22, 2022
1 parent 82daca0 commit b076302
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxy/handler_one2many.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func (s *handler) forwardServerToClientsMulti(src grpc.ServerStream, destination
}

if liveDestinations == 0 {
ret <- errors.New("no backend connections to forward to are available")
ret <- io.EOF

return
}
Expand Down

0 comments on commit b076302

Please sign in to comment.