Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Commit

Permalink
update: 断线重连提醒
Browse files Browse the repository at this point in the history
  • Loading branch information
sjlleo committed Jul 20, 2022
1 parent 6e3fabd commit b2f528a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wshandle/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func (c *WsConn) keepAlive() {
if !c.Connected && !c.Connecting {
c.Connecting = true
New()
log.Println("WebSocket 连接意外断开,正在尝试重连...")
}
}
}
Expand Down Expand Up @@ -99,7 +100,6 @@ func createWsConn() *WsConn {
MsgSendCh: make(chan string),
MsgReceiveCh: make(chan string),
}
log.Println("WebSocket 连接意外断开,正在尝试重连...")

if err != nil {
log.Println("dial:", err)
Expand Down

0 comments on commit b2f528a

Please sign in to comment.