mirror of
https://github.com/henrygd/beszel.git
synced 2026-09-21 08:57:48 +02:00
fix(agent): don't warn about unset HUB_URL in SSH-only mode (#2316)
This commit is contained in:
@@ -30,6 +30,11 @@ const (
|
||||
wsDeadline = 120 * time.Second
|
||||
)
|
||||
|
||||
// errNoHubURL is returned when HUB_URL is unset. This is not a failure
|
||||
// condition: an agent configured with only a public key runs in SSH-only mode,
|
||||
// where the hub dials the agent and no outbound WebSocket client is expected.
|
||||
var errNoHubURL = errors.New("HUB_URL environment variable not set")
|
||||
|
||||
type caCertFileError struct {
|
||||
err error
|
||||
}
|
||||
@@ -63,7 +68,7 @@ type WebSocketClient struct {
|
||||
func newWebSocketClient(agent *Agent) (client *WebSocketClient, err error) {
|
||||
hubURLStr, exists := utils.GetEnv("HUB_URL")
|
||||
if !exists {
|
||||
return nil, errors.New("HUB_URL environment variable not set")
|
||||
return nil, errNoHubURL
|
||||
}
|
||||
|
||||
client = &WebSocketClient{}
|
||||
|
||||
Reference in New Issue
Block a user