Skip to content

Commit

Permalink
feat: support text ping pong
Browse files Browse the repository at this point in the history
  • Loading branch information
withchao committed Nov 5, 2024
1 parent b49a8dd commit f185c98
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/msggateway/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,9 @@ func (c *Client) handlerTextMessage(b []byte) error {
if err != nil {
return err
}
if err := c.conn.SetWriteDeadline(writeWait); err != nil {
return err
}
return c.conn.WriteMessage(MessageText, msgData)
default:
return fmt.Errorf("not support message type %s", msg.Type)
Expand Down

0 comments on commit f185c98

Please sign in to comment.