summaryrefslogtreecommitdiff
path: root/internal/failover/monitor.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-02-06 14:43:06 +0100
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2024-02-19 14:15:07 +0100
commit3fd29f3e1c963196cac69fcbb9d68116f7ea80ec (patch)
tree7cb586d304167e4198166ff17dc79d33122a75e5 /internal/failover/monitor.go
parent2337dcde60a710d2f65d3fe1107811202e34c633 (diff)
All: Prepare to get rid of go-errors/errors lib
Diffstat (limited to 'internal/failover/monitor.go')
-rw-r--r--internal/failover/monitor.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/failover/monitor.go b/internal/failover/monitor.go
index 2219fc4..987cce6 100644
--- a/internal/failover/monitor.go
+++ b/internal/failover/monitor.go
@@ -1,11 +1,12 @@
package failover
import (
+ "fmt"
"context"
+ "errors"
"time"
"github.com/eduvpn/eduvpn-common/internal/log"
- "github.com/go-errors/errors"
)
// The DroppedConMon is a connection monitor that checks for an increase in rx bytes in certain intervals
@@ -91,7 +92,7 @@ func (m *DroppedConMon) Start(ctx context.Context, gateway string, mtuSize int)
case <-ticker.C:
continue
case <-ctx.Done():
- return false, errors.WrapPrefix(context.Canceled, "failover was stopped", 0)
+ return false, fmt.Errorf("failover was stopped with error: %w", context.Canceled)
}
}