mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-08 16:46:37 +08:00
merge(wavelet): sync upstream changes
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"time"
|
||||
|
||||
service "Wavelet/openflare/share/protocol"
|
||||
"Wavelet/pkg/util"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -143,7 +144,7 @@ func (m *Manager) UpdateConfig(ctx context.Context, cfg *service.RelayConfig) {
|
||||
m.lastError = err.Error()
|
||||
return
|
||||
}
|
||||
go m.supervise(ctx, generation)
|
||||
util.Go(func() { m.supervise(ctx, generation) })
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -167,7 +168,7 @@ func (m *Manager) UpdateConfig(ctx context.Context, cfg *service.RelayConfig) {
|
||||
return
|
||||
}
|
||||
|
||||
go m.supervise(ctx, generation)
|
||||
util.Go(func() { m.supervise(ctx, generation) })
|
||||
}
|
||||
|
||||
func (m *Manager) renderConfig(cfg *service.RelayConfig) error {
|
||||
|
||||
@@ -17,6 +17,7 @@ import (
|
||||
"Wavelet/openflare/plugins/relay/wsclient"
|
||||
edgerunner "Wavelet/openflare/share/edge/runner"
|
||||
service "Wavelet/openflare/share/protocol"
|
||||
"Wavelet/pkg/util"
|
||||
)
|
||||
|
||||
// Runner manages the relay process.
|
||||
@@ -31,7 +32,7 @@ type Runner struct {
|
||||
|
||||
// Run starts the relay process by initiating the heartbeat and WS reconnection loop.
|
||||
func (r *Runner) Run(ctx context.Context) error {
|
||||
go r.HeartbeatService.Run(ctx)
|
||||
util.Go(func() { r.HeartbeatService.Run(ctx) })
|
||||
|
||||
return edgerunner.RunWSReconnectLoop(ctx, edgerunner.WSReconnectConfig{
|
||||
ComponentName: "relay",
|
||||
|
||||
Reference in New Issue
Block a user