Skip to content

Commit

Permalink
timeout 30*3
Browse files Browse the repository at this point in the history
  • Loading branch information
skiffer-git committed Dec 3, 2021
1 parent 22d560f commit 4cfdb17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions open_im_sdk/open_im_sdk_conversation_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -1002,13 +1002,13 @@ func (u *UserRelated) SendMessage(callback SendMsgCallBack, message, receiver, g

SendFlag := false
var connSend *websocket.Conn
for tr := 0; tr < 3; tr++ {
for tr := 0; tr < 30; tr++ {
LogBegin("WriteMsg", wsReq.OperationID)
err, connSend = u.WriteMsg(wsReq)
LogEnd("WriteMsg ", wsReq.OperationID, connSend)
if err != nil {
sdkLog("ws writeMsg err:,", wsReq.OperationID, err.Error(), tr)
time.Sleep(time.Duration(30) * time.Second)
time.Sleep(time.Duration(5) * time.Second)
} else {
sdkLog("writeMsg retry ok", wsReq.OperationID, tr)
SendFlag = true
Expand Down

0 comments on commit 4cfdb17

Please sign in to comment.