mirror of
https://github.com/asmogo/nws.git
synced 2025-01-05 20:30:09 +00:00
update error handling (#41)
This commit is contained in:
parent
ce11bb963a
commit
129c8fc55a
@ -119,7 +119,7 @@ func NewExit(ctx context.Context, exitNodeConfig *config.ExitConfig) *Exit {
|
|||||||
}
|
}
|
||||||
err = exit.announceExitNode(ctx)
|
err = exit.announceExitNode(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
slog.Error("failed to announce exit node", "error", err)
|
||||||
}
|
}
|
||||||
return exit
|
return exit
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
|
|
||||||
const ten = 10
|
const ten = 10
|
||||||
|
|
||||||
var errNoPublicKey = errors.New("no public key found")
|
var errNoPublicKey = errors.New("no public configuration")
|
||||||
|
|
||||||
func (e *Exit) announceExitNode(ctx context.Context) error {
|
func (e *Exit) announceExitNode(ctx context.Context) error {
|
||||||
if !e.config.Public {
|
if !e.config.Public {
|
||||||
|
Loading…
Reference in New Issue
Block a user