adapters: change "error not found" to "packet lost"
This commit is contained in:
parent
5428dcee3c
commit
93630f64ef
|
@ -66,10 +66,15 @@ class PingAdapter(Adapter):
|
||||||
else:
|
else:
|
||||||
latency = 0
|
latency = 0
|
||||||
|
|
||||||
err = PING_ERROR_RGX.search(out)
|
worker.log.info(f'alive={alive} latency={latency}ms')
|
||||||
err_msg = err.group(2) if not alive and err else 'error not found'
|
|
||||||
|
if alive:
|
||||||
|
# we dont need to keep sending err_msg on alive scenarios
|
||||||
|
return cls._construct(alive, latency)
|
||||||
|
|
||||||
|
err = PING_ERROR_RGX.search(out)
|
||||||
|
err_msg = err.group(2) if not alive and err else 'packet lost'
|
||||||
|
|
||||||
worker.log.info(f'alive={alive} latency={latency}ms err={err_msg!r}')
|
|
||||||
return cls._construct(alive, latency, err_msg)
|
return cls._construct(alive, latency, err_msg)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue