don't write anything if theres no data
This commit is contained in:
parent
45c986c5f1
commit
6358b9277d
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user