Try and return a new connection when we see the old one fail

This commit is contained in:
idk
2020-11-22 10:56:35 -05:00
parent dc12ba56d4
commit 379de14264
2 changed files with 5 additions and 4 deletions

View File

@ -3,10 +3,9 @@ goSam
A go library for using the [I2P](https://geti2p.net/en/) Simple Anonymous
Messaging ([SAM version 3.0](https://geti2p.net/en/docs/api/samv3)) bridge. It
has support for SAM version 3.1 signature types.
has support for all streaming features SAM version 3.2.
This is in an **early development stage**. I would love to hear about any
issues or ideas for improvement.
This is widely used and easy to use, but thusfar, mostly by me.
## Installation
```

View File

@ -26,7 +26,9 @@ func (c *Client) DialContext(ctx context.Context, network, addr string) (net.Con
}()
select {
case err := <-errCh:
return nil, err
// var err error
c, err = c.NewClient()
return c.SamConn, err
case conn := <-connCh:
return conn, nil
case <-ctx.Done():