Skip to content

Commit dff6592

Browse files
authored
Merge pull request #63 from ipfs-force-community/fix/factory_log
2 parents fa97bd7 + 5653eaf commit dff6592

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ func httpClient(ctx context.Context, addr string, namespace string, outs []inter
189189
func websocketClient(ctx context.Context, addr string, namespace string, outs []interface{}, requestHeader http.Header, config Config) (ClientCloser, error) {
190190
connFactory := func() (*websocket.Conn, error) {
191191
conn, _, err := websocket.DefaultDialer.Dial(addr, requestHeader)
192-
return conn, xerrors.Errorf("cannot dial address %s for %w", addr, err)
192+
if err != nil {
193+
return nil, xerrors.Errorf("cannot dial address %s for %w", addr, err)
194+
}
195+
return conn, nil
193196
}
194197

195198
if config.proxyConnFactory != nil {

0 commit comments

Comments
 (0)