summaryrefslogtreecommitdiff
path: root/rpm
diff options
context:
space:
mode:
Diffstat (limited to 'rpm')
-rw-r--r--rpm/rpm.go60
1 files changed, 38 insertions, 22 deletions
diff --git a/rpm/rpm.go b/rpm/rpm.go
index 99a52b6..c900642 100644
--- a/rpm/rpm.go
+++ b/rpm/rpm.go
@@ -158,30 +158,46 @@ func CombinedProber(
)
// Start Self Download Connection Prober
- go probe.Probe(
- networkActivityCtx,
- &wg,
- selfDownProbeConnection.Client(),
- selfProbeConfiguration.URL,
- selfProbeConfiguration.Host,
- probe.SelfDown,
- &dataPoints,
- captureExtendedStats,
- debugging,
- )
+
+ // TODO: Make the following sanity check more than just a check.
+ // We only want to start a SelfDown probe on a connection that is
+ // in the RUNNING state.
+ if selfDownProbeConnection.Status() == lgc.LGC_STATUS_RUNNING {
+ go probe.Probe(
+ networkActivityCtx,
+ &wg,
+ selfDownProbeConnection.Client(),
+ selfProbeConfiguration.URL,
+ selfProbeConfiguration.Host,
+ probe.SelfDown,
+ &dataPoints,
+ captureExtendedStats,
+ debugging,
+ )
+ } else {
+ panic(fmt.Sprintf("(%s) Combined probe driver evidently lost its underlying connection (Status: %v).\n", debugging.Prefix, selfDownProbeConnection.Status()))
+ }
// Start Self Upload Connection Prober
- go probe.Probe(
- proberCtx,
- &wg,
- selfUpProbeConnection.Client(),
- selfProbeConfiguration.URL,
- selfProbeConfiguration.Host,
- probe.SelfUp,
- &dataPoints,
- captureExtendedStats,
- debugging,
- )
+
+ // TODO: Make the following sanity check more than just a check.
+ // We only want to start a SelfDown probe on a connection that is
+ // in the RUNNING state.
+ if selfUpProbeConnection.Status() == lgc.LGC_STATUS_RUNNING {
+ go probe.Probe(
+ proberCtx,
+ &wg,
+ selfUpProbeConnection.Client(),
+ selfProbeConfiguration.URL,
+ selfProbeConfiguration.Host,
+ probe.SelfUp,
+ &dataPoints,
+ captureExtendedStats,
+ debugging,
+ )
+ } else {
+ panic(fmt.Sprintf("(%s) Combined probe driver evidently lost its underlying connection (Status: %v).\n", debugging.Prefix, selfUpProbeConnection.Status()))
+ }
}
if debug.IsDebug(debugging.Level) {
fmt.Printf(