mirror of
https://github.com/go-micro/go-micro.git
synced 2025-08-10 21:52:01 +02:00
don't write anything if theres no data
This commit is contained in:
@@ -126,6 +126,10 @@ func (c *Codec) Write(m *codec.Message, b interface{}) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(buf) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
return encode(0, buf, c.Conn)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user