diff --git a/internal/msggateway/client.go b/internal/msggateway/client.go index af96e7d460..6e31751dc8 100644 --- a/internal/msggateway/client.go +++ b/internal/msggateway/client.go @@ -446,6 +446,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 }