diff options
author | Valery Piashchynski <[email protected]> | 2021-06-16 15:21:56 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-06-16 15:21:56 +0300 |
commit | b1aa5d0ea3617710aec6476bdae956e16b946281 (patch) | |
tree | 5b7c5259375d53b0685bf838555118d5ad93f149 /plugins/websockets/connection | |
parent | 8220151b6356488b8ef87fa52b14d2178a4e612d (diff) |
- Update ws plugin responses (text instead of binary)
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/websockets/connection')
-rw-r--r-- | plugins/websockets/connection/connection.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/websockets/connection/connection.go b/plugins/websockets/connection/connection.go index 2b847173..04c29d83 100644 --- a/plugins/websockets/connection/connection.go +++ b/plugins/websockets/connection/connection.go @@ -22,7 +22,7 @@ func NewConnection(wsConn *websocket.Conn, log logger.Logger) *Connection { } } -func (c *Connection) Write(mt int, data []byte) error { +func (c *Connection) Write(data []byte) error { c.Lock() defer c.Unlock() @@ -34,7 +34,7 @@ func (c *Connection) Write(mt int, data []byte) error { } }() - err := c.conn.WriteMessage(mt, data) + err := c.conn.WriteMessage(websocket.TextMessage, data) if err != nil { return errors.E(op, err) } |