mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
make sure conn is not nil
This commit is contained in:
parent
50bf003022
commit
2345148fde
1 changed files with 3 additions and 0 deletions
|
@ -369,6 +369,9 @@ func (c *Client) Send(options TransferOptions) (err error) {
|
||||||
}
|
}
|
||||||
log.Debugf("could not establish '%s'", address)
|
log.Debugf("could not establish '%s'", address)
|
||||||
}
|
}
|
||||||
|
if conn == nil && err == nil {
|
||||||
|
err = fmt.Errorf("could not connect")
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = fmt.Errorf("could not connect to %s: %w", c.Options.RelayAddress, err)
|
err = fmt.Errorf("could not connect to %s: %w", c.Options.RelayAddress, err)
|
||||||
log.Debug(err)
|
log.Debug(err)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue