We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c907d96 commit 73330f8Copy full SHA for 73330f8
pkg/device-agent/eventloop.go
@@ -189,6 +189,18 @@ func (das *DeviceAgentServer) EventLoop(programContext context.Context) {
189
break
190
}
191
192
+ helperHealthCheckCtx, cancel := context.WithTimeout(programContext, 1*time.Second)
193
+ if _, err := das.DeviceHelper.GetSerial(helperHealthCheckCtx, &pb.GetSerialRequest{}); err != nil {
194
+ cancel()
195
+
196
+ das.log.WithError(err).Errorf("Unable to communicate with helper.Shutting down")
197
+ das.notifier.Errorf("Unable to communicate with helper. Shutting down.")
198
199
+ das.stateChange <- pb.AgentState_Disconnecting
200
+ break
201
+ }
202
203
204
wg := &sync.WaitGroup{}
205
206
total := len(status.GetGateways())
0 commit comments