re-use remote transports in Peer,Storage,Locker clients (#10788)

use one transport for internode communication
This commit is contained in:
Harshavardhana
2020-11-02 07:43:11 -08:00
committed by GitHub
parent d8e07f2c41
commit 4c773f7068
12 changed files with 31 additions and 67 deletions

View File

@@ -21,7 +21,6 @@ import (
"errors"
"net/http"
"sync"
"time"
)
@@ -83,14 +82,12 @@ func LogOnceIf(ctx context.Context, err error, id interface{}, errKind ...interf
return
}
if errors.Is(err, context.Canceled) || errors.Is(err, http.ErrServerClosed) {
if errors.Is(err, context.Canceled) {
return
}
if e := errors.Unwrap(err); e != nil {
if e.Error() == "disk not found" {
return
}
if err.Error() == http.ErrServerClosed.Error() || err.Error() == "disk not found" {
return
}
logOnce.logOnceIf(ctx, err, id, errKind...)