diff --git a/internal/msggateway/client.go b/internal/msggateway/client.go index d57f1f809..0da7d7220 100644 --- a/internal/msggateway/client.go +++ b/internal/msggateway/client.go @@ -452,6 +452,8 @@ func (c *Client) handlerTextMessage(b []byte) error { if err != nil { return err } + c.w.Lock() + defer c.w.Unlock() if err := c.conn.SetWriteDeadline(writeWait); err != nil { return err }