mirror of
https://github.com/ZeroDream-CN/SakuraFrp
synced 2024-11-21 23:09:47 +00:00
commit
134a46c00b
@ -96,12 +96,12 @@ func (monitor *HealthCheckMonitor) Stop() {
|
|||||||
|
|
||||||
func (monitor *HealthCheckMonitor) checkWorker() {
|
func (monitor *HealthCheckMonitor) checkWorker() {
|
||||||
for {
|
for {
|
||||||
ctx, cancel := context.WithDeadline(monitor.ctx, time.Now().Add(monitor.timeout))
|
doCtx, cancel := context.WithDeadline(monitor.ctx, time.Now().Add(monitor.timeout))
|
||||||
err := monitor.doCheck(ctx)
|
err := monitor.doCheck(doCtx)
|
||||||
|
|
||||||
// check if this monitor has been closed
|
// check if this monitor has been closed
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-monitor.ctx.Done():
|
||||||
cancel()
|
cancel()
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
|
@ -19,7 +19,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
var version string = "0.28.1"
|
var version string = "0.28.2"
|
||||||
|
|
||||||
func Full() string {
|
func Full() string {
|
||||||
return version
|
return version
|
||||||
|
Loading…
Reference in New Issue
Block a user