mirror of
https://github.com/go-micro/go-micro.git
synced 2025-03-29 20:39:48 +02:00
fix code proto return invalid message (#2196)
Co-authored-by: ben <norton0395@gmail.com>
This commit is contained in:
parent
e1bc7e3028
commit
c3107e6843
@ -33,6 +33,10 @@ func (c *Codec) ReadBody(b interface{}) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Codec) Write(m *codec.Message, b interface{}) error {
|
func (c *Codec) Write(m *codec.Message, b interface{}) error {
|
||||||
|
if b == nil {
|
||||||
|
// Nothing to write
|
||||||
|
return nil
|
||||||
|
}
|
||||||
p, ok := b.(proto.Message)
|
p, ok := b.(proto.Message)
|
||||||
if !ok {
|
if !ok {
|
||||||
return codec.ErrInvalidMessage
|
return codec.ErrInvalidMessage
|
||||||
|
Loading…
x
Reference in New Issue
Block a user