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
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(buf) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
return encode(0, buf, c.Conn)
|
return encode(0, buf, c.Conn)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user