Skip to content

Commit ad98fd6

Browse files
committed
return err early if EOF to prevent logging in normal conditions
This matches the client streaming case more closely
1 parent faa3576 commit ad98fd6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

protoc-gen-grpc-gateway/gengateway/template.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ var (
248248
handleSend := func() error {
249249
var protoReq {{.Method.RequestType.GoType .Method.Service.File.GoPkg.Path}}
250250
err = dec.Decode(&protoReq)
251+
if err == io.EOF {
252+
return err
253+
}
251254
if err != nil {
252255
grpclog.Printf("Failed to decode request: %v", err)
253256
return err

0 commit comments

Comments
 (0)