This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/develop by this push:
new 36ba462d7 feat: finished 2 todos in client_stream.go (#3088)
36ba462d7 is described below
commit 36ba462d708d4bdb0171537b9a5c475838343262
Author: 翎 <[email protected]>
AuthorDate: Wed Nov 26 10:07:34 2025 +0800
feat: finished 2 todos in client_stream.go (#3088)
---
protocol/triple/triple_protocol/client_stream.go | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/protocol/triple/triple_protocol/client_stream.go
b/protocol/triple/triple_protocol/client_stream.go
index cb6f0722a..16c356dcf 100644
--- a/protocol/triple/triple_protocol/client_stream.go
+++ b/protocol/triple/triple_protocol/client_stream.go
@@ -64,10 +64,7 @@ func (c *ClientStreamForClient) Send(request any) error {
if c.err != nil {
return c.err
}
- // todo(DMwangnima): remove this redundant statement
- if request == nil {
- return c.conn.Send(nil)
- }
+
return c.conn.Send(request)
}
@@ -124,10 +121,6 @@ func (s *ServerStreamForClient) Receive(msg any) bool {
// Msg returns the most recent message unmarshaled by a call to Receive.
func (s *ServerStreamForClient) Msg() any {
- // todo(DMwangnima): processing nil pointer
- //if s.msg == nil {
- // s.msg = new(Res)
- //}
return s.msg
}
@@ -223,10 +216,6 @@ func (b *BidiStreamForClient) Send(msg any) error {
if b.err != nil {
return b.err
}
- // todo(DMwangnima): remove this redundant statement
- if msg == nil {
- return b.conn.Send(nil)
- }
return b.conn.Send(msg)
}