Skip to content

Commit

Permalink
heartbeat interval
Browse files Browse the repository at this point in the history
  • Loading branch information
skiffer-git committed Dec 10, 2021
1 parent 5916897 commit a6c6f4e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion open_im_sdk/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ var UserSDKRwLock sync.RWMutex
var UserRouterMap map[string]*UserRelated
var SvrConf IMConfig
var SdkLogFlag int32
var HearbeatInterval int32 = 5
var hearbeatInterval int32 = 5
var userForSDK *UserRelated

const (
Expand Down
2 changes: 1 addition & 1 deletion open_im_sdk/init_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ func (u *UserRelated) heartbeat() {

u.DelCh(msgIncr)
LogEnd("DelCh", wsReq.OperationID)
time.Sleep(time.Duration(HearbeatInterval) * time.Second)
time.Sleep(time.Duration(hearbeatInterval) * time.Second)
}
}

Expand Down
2 changes: 1 addition & 1 deletion open_im_sdk/open_im_sdk_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func SetSdkLog(flag int32) {
}

func SetHearbeatInterval(interval int32) {
HearbeatInterval = interval
hearbeatInterval = interval
}

func UnInitSDK() {
Expand Down

0 comments on commit a6c6f4e

Please sign in to comment.