Chore: throw more detail dial error

This commit is contained in:
Dreamacro
2019-12-05 17:51:21 +08:00
parent ad53b42a68
commit b8267a69f6
4 changed files with 13 additions and 13 deletions

View File

@ -45,7 +45,7 @@ func (h *Http) DialContext(ctx context.Context, metadata *C.Metadata) (C.Conn, e
}
if err != nil {
return nil, fmt.Errorf("%s connect error", h.addr)
return nil, fmt.Errorf("%s connect error: %w", h.addr, err)
}
tcpKeepAlive(c)
if err := h.shakeHand(metadata, c); err != nil {