mirror of https://github.com/schollz/croc.git
make sure conn is not nil
This commit is contained in:
parent
50bf003022
commit
2345148fde
|
@ -369,6 +369,9 @@ func (c *Client) Send(options TransferOptions) (err error) {
|
|||
}
|
||||
log.Debugf("could not establish '%s'", address)
|
||||
}
|
||||
if conn == nil && err == nil {
|
||||
err = fmt.Errorf("could not connect")
|
||||
}
|
||||
if err != nil {
|
||||
err = fmt.Errorf("could not connect to %s: %w", c.Options.RelayAddress, err)
|
||||
log.Debug(err)
|
||||
|
|
Loading…
Reference in New Issue