Skip to content

Commit

Permalink
Merge pull request #57 from testwill/typo
Browse files Browse the repository at this point in the history
fix: typo
  • Loading branch information
lesismal authored Jan 24, 2024
2 parents be90e91 + d8b0096 commit 2b62dc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/pubsub_ws_with_nbio/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func onMessage(c *websocket.Conn, mt websocket.MessageType, data []byte) {
data = session.cache
}

recieved := false
received := false
for {
if len(data)-start < arpc.HeadLen {
goto Exit
Expand All @@ -192,11 +192,11 @@ func onMessage(c *websocket.Conn, mt websocket.MessageType, data []byte) {
start += total
msg := psServer.Handler.NewMessageWithBuffer(buffer)
psServer.Handler.OnMessage(session.Client, msg)
recieved = true
received = true
}

Exit:
if recieved {
if received {
c.SetReadDeadline(time.Now().Add(keepaliveTime))
}
if session.cache != nil {
Expand Down

0 comments on commit 2b62dc3

Please sign in to comment.