mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-27 12:08:52 +08:00
fix: message encode
This commit is contained in:
parent
7a3ff78d5a
commit
478357fec3
@ -235,14 +235,14 @@ func (c *Client) writeBinaryMsg(resp Resp) error {
|
||||
}
|
||||
encodedBuf := bufferPool.Get().([]byte)
|
||||
resultBuf := bufferPool.Get().([]byte)
|
||||
encodeBuf, err := c.longConnServer.Encode(resp)
|
||||
encodedBuf, err := c.longConnServer.Encode(resp)
|
||||
if err != nil {
|
||||
return utils.Wrap(err, "")
|
||||
}
|
||||
_ = c.conn.SetWriteDeadline(writeWait)
|
||||
if c.isCompress {
|
||||
var compressErr error
|
||||
resultBuf, compressErr = c.longConnServer.Compress(encodeBuf)
|
||||
resultBuf, compressErr = c.longConnServer.Compress(encodedBuf)
|
||||
if compressErr != nil {
|
||||
return utils.Wrap(compressErr, "")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user