server: wrap errors (#8879)

Follow-up of #8842
This commit is contained in:
Alessio Treglia 2021-03-15 13:50:12 +00:00 committed by GitHub
parent d4d27e1c0c
commit 42919c8f33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,8 @@ package server
import (
"fmt"
"net"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
// Get a free address for a test tendermint server
@ -14,7 +16,7 @@ func FreeTCPAddr() (addr, port string, err error) {
}
if err := l.Close(); err != nil {
return "", "", fmt.Errorf("couldn't close the listener: %w", err)
return "", "", sdkerrors.Wrap(err, "couldn't close the listener")
}
portI := l.Addr().(*net.TCPAddr).Port