@@ -1645,10 +1645,10 @@ func (s *Server) processStreamingRPC(ctx context.Context, stream *transport.Serv
1645
1645
// If dc is set and matches the stream's compression, use it. Otherwise, try
1646
1646
// to find a matching registered compressor for decomp.
1647
1647
if rc := stream .RecvCompress (); s .opts .dc != nil && s .opts .dc .Type () == rc {
1648
- ss .dc = s .opts .dc
1648
+ ss .decompressorV0 = s .opts .dc
1649
1649
} else if rc != "" && rc != encoding .Identity {
1650
- ss .decomp = encoding .GetCompressor (rc )
1651
- if ss .decomp == nil {
1650
+ ss .decompressorV1 = encoding .GetCompressor (rc )
1651
+ if ss .decompressorV1 == nil {
1652
1652
st := status .Newf (codes .Unimplemented , "grpc: Decompressor is not installed for grpc-encoding %q" , rc )
1653
1653
ss .s .WriteStatus (st )
1654
1654
return st .Err ()
@@ -1660,12 +1660,12 @@ func (s *Server) processStreamingRPC(ctx context.Context, stream *transport.Serv
1660
1660
//
1661
1661
// NOTE: this needs to be ahead of all handling, https://github.com/grpc/grpc-go/issues/686.
1662
1662
if s .opts .cp != nil {
1663
- ss .cp = s .opts .cp
1663
+ ss .compressorV0 = s .opts .cp
1664
1664
ss .sendCompressorName = s .opts .cp .Type ()
1665
1665
} else if rc := stream .RecvCompress (); rc != "" && rc != encoding .Identity {
1666
1666
// Legacy compressor not specified; attempt to respond with same encoding.
1667
- ss .comp = encoding .GetCompressor (rc )
1668
- if ss .comp != nil {
1667
+ ss .compressorV1 = encoding .GetCompressor (rc )
1668
+ if ss .compressorV1 != nil {
1669
1669
ss .sendCompressorName = rc
1670
1670
}
1671
1671
}
@@ -1676,7 +1676,7 @@ func (s *Server) processStreamingRPC(ctx context.Context, stream *transport.Serv
1676
1676
}
1677
1677
}
1678
1678
1679
- ss .ctx = newContextWithRPCInfo (ss .ctx , false , ss .codec , ss .cp , ss .comp )
1679
+ ss .ctx = newContextWithRPCInfo (ss .ctx , false , ss .codec , ss .compressorV0 , ss .compressorV1 )
1680
1680
1681
1681
if trInfo != nil {
1682
1682
trInfo .tr .LazyLog (& trInfo .firstLine , false )
0 commit comments