Skip to content

Commit 1180253

Browse files
committed
https://github.com/mwitkow/grpc-proxy/pull/57
1 parent db34e7b commit 1180253

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

proxy/handler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"google.golang.org/grpc"
1111
"google.golang.org/grpc/codes"
1212
"google.golang.org/grpc/status"
13-
"google.golang.org/protobuf/types/known/anypb"
13+
"google.golang.org/protobuf/types/known/emptypb"
1414
)
1515

1616
var (
@@ -112,7 +112,7 @@ func (s *handler) handler(srv interface{}, serverStream grpc.ServerStream) error
112112
func (s *handler) forwardClientToServer(src grpc.ClientStream, dst grpc.ServerStream) chan error {
113113
ret := make(chan error, 1)
114114
go func() {
115-
f := &anypb.Any{}
115+
f := &emptypb.Empty{}
116116
for i := 0; ; i++ {
117117
if err := src.RecvMsg(f); err != nil {
118118
ret <- err // this can be io.EOF which is happy case
@@ -144,7 +144,7 @@ func (s *handler) forwardClientToServer(src grpc.ClientStream, dst grpc.ServerSt
144144
func (s *handler) forwardServerToClient(src grpc.ServerStream, dst grpc.ClientStream) chan error {
145145
ret := make(chan error, 1)
146146
go func() {
147-
f := &anypb.Any{}
147+
f := &emptypb.Empty{}
148148
for i := 0; ; i++ {
149149
if err := src.RecvMsg(f); err != nil {
150150
ret <- err // this can be io.EOF which is happy case

0 commit comments

Comments
 (0)