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

修改建议 #7

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion base_device.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (device *baseIotDevice) DisConnect() {
}
func (device *baseIotDevice) IsConnected() bool {
if device.Client != nil {
return device.Client.IsConnected()
return device.Client.IsConnectionOpen()
}

return false
Expand All @@ -165,6 +165,7 @@ func (device *baseIotDevice) Init() bool {
options.SetKeepAlive(250 * time.Second)
options.SetAutoReconnect(true)
options.SetConnectRetry(true)
options.SetConnectRetryInterval(10 * time.Second)
options.SetConnectTimeout(2 * time.Second)
if strings.Contains(device.Servers, "tls") || strings.Contains(device.Servers, "ssl") {
glog.Infof("server support tls connection")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/ctlove0523/huaweicloud-iot-device-sdk-go
module github.com/DarkGodOne/huaweicloud-iot-device-sdk-go
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should not be changed.


go 1.15

Expand Down
4 changes: 2 additions & 2 deletions sdk_info
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
author = chen tong
sdk-version = v1.0.0
author = chen tong,changed by darkgod
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

author = chen tong, darkgod

sdk-version = v1.0.0-patch
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can merge code to main branch