Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复错误拼写 #19

Merged
merged 3 commits into from
Apr 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions services/service/handler/message_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ func (h *ServiceHandler) MessageAck(c iris.Context) {
return
}
// save in redis
err := setMesssageAck(h.Cache, req.Account, req.MessageId)
err := setMessageAck(h.Cache, req.Account, req.MessageId)
if err != nil {
c.StopWithError(iris.StatusInternalServerError, err)
return
}
}

func setMesssageAck(cache *redis.Client, account string, msgId int64) error {
func setMessageAck(cache *redis.Client, account string, msgId int64) error {
if msgId == 0 {
return nil
}
Expand Down Expand Up @@ -183,7 +183,7 @@ func (h *ServiceHandler) GetOfflineMessageIndex(c iris.Context) {
c.StopWithError(iris.StatusInternalServerError, err)
return
}
err = setMesssageAck(h.Cache, req.Account, msgId)
err = setMessageAck(h.Cache, req.Account, msgId)
if err != nil {
c.StopWithError(iris.StatusInternalServerError, err)
return
Expand Down
6 changes: 3 additions & 3 deletions tcp/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ func (c *Client) Connect(addr string) error {

if c.options.Heartbeat > 0 {
go func() {
err := c.heartbealoop()
err := c.heartbeatloop()
if err != nil {
logger.WithField("module", "tcp.client").Warn("heartbealoop stopped - ", err)
logger.WithField("module", "tcp.client").Warn("heartbeatloop stopped - ", err)
}
}()
}
Expand Down Expand Up @@ -137,7 +137,7 @@ func (c *Client) Read() (kim.Frame, error) {
return frame, nil
}

func (c *Client) heartbealoop() error {
func (c *Client) heartbeatloop() error {
tick := time.NewTicker(c.options.Heartbeat)
for range tick.C {
// 发送一个ping的心跳包给服务端
Expand Down
6 changes: 3 additions & 3 deletions websocket/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ func (c *Client) Connect(addr string) error {

if c.options.Heartbeat > 0 {
go func() {
err := c.heartbealoop(conn)
err := c.heartbeatloop(conn)
if err != nil {
logger.Error("heartbealoop stopped -- ", err)
logger.Error("heartbeatloop stopped ", err)
}
}()
}
Expand Down Expand Up @@ -147,7 +147,7 @@ func (c *Client) Read() (kim.Frame, error) {
}, nil
}

func (c *Client) heartbealoop(conn net.Conn) error {
func (c *Client) heartbeatloop(conn net.Conn) error {
tick := time.NewTicker(c.options.Heartbeat)
for range tick.C {
// 发送一个ping的心跳包给服务端
Expand Down