|
|
@ -281,7 +281,6 @@ func (c *Auto) authRoutine() {
|
|
|
|
|
|
|
|
|
|
|
|
report := func(err error, msg string) {
|
|
|
|
report := func(err error, msg string) {
|
|
|
|
c.logf("[v1] %s: %v", msg, err)
|
|
|
|
c.logf("[v1] %s: %v", msg, err)
|
|
|
|
err = fmt.Errorf("%s: %v", msg, err)
|
|
|
|
|
|
|
|
// don't send status updates for context errors,
|
|
|
|
// don't send status updates for context errors,
|
|
|
|
// since context cancelation is always on purpose.
|
|
|
|
// since context cancelation is always on purpose.
|
|
|
|
if ctx.Err() == nil {
|
|
|
|
if ctx.Err() == nil {
|
|
|
@ -431,7 +430,7 @@ func (c *Auto) mapRoutine() {
|
|
|
|
|
|
|
|
|
|
|
|
report := func(err error, msg string) {
|
|
|
|
report := func(err error, msg string) {
|
|
|
|
c.logf("[v1] %s: %v", msg, err)
|
|
|
|
c.logf("[v1] %s: %v", msg, err)
|
|
|
|
err = fmt.Errorf("%s: %v", msg, err)
|
|
|
|
err = fmt.Errorf("%s: %w", msg, err)
|
|
|
|
// don't send status updates for context errors,
|
|
|
|
// don't send status updates for context errors,
|
|
|
|
// since context cancelation is always on purpose.
|
|
|
|
// since context cancelation is always on purpose.
|
|
|
|
if ctx.Err() == nil {
|
|
|
|
if ctx.Err() == nil {
|
|
|
@ -599,9 +598,7 @@ func (c *Auto) sendStatus(who string, err error, url string, nm *netmap.NetworkM
|
|
|
|
NetMap: nm,
|
|
|
|
NetMap: nm,
|
|
|
|
Hostinfo: hi,
|
|
|
|
Hostinfo: hi,
|
|
|
|
State: state,
|
|
|
|
State: state,
|
|
|
|
}
|
|
|
|
Err: err,
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
new.Err = err.Error()
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if statusFunc != nil {
|
|
|
|
if statusFunc != nil {
|
|
|
|
statusFunc(new)
|
|
|
|
statusFunc(new)
|
|
|
|