|
@@ -1,7 +1,6 @@
|
|
|
package main
|
|
|
|
|
|
import (
|
|
|
- "errors"
|
|
|
"github.com/garyburd/redigo/redis"
|
|
|
"sparrow/pkg/online"
|
|
|
"sparrow/pkg/rpcs"
|
|
@@ -61,12 +60,11 @@ func (dm *DeviceManager) GetDeviceOnlineStatus(args rpcs.ArgsGetDeviceOnlineStat
|
|
|
return err
|
|
|
}
|
|
|
|
|
|
- if status == nil {
|
|
|
- return errors.New("device not online")
|
|
|
+ if status != nil {
|
|
|
+ reply.ClientIP = status.ClientIP
|
|
|
+ reply.AccessRPCHost = status.AccessRPCHost
|
|
|
+ reply.HeartbeatInterval = status.HeartbeatInterval
|
|
|
}
|
|
|
|
|
|
- reply.ClientIP = status.ClientIP
|
|
|
- reply.AccessRPCHost = status.AccessRPCHost
|
|
|
- reply.HeartbeatInterval = status.HeartbeatInterval
|
|
|
return nil
|
|
|
}
|