chore: allow nil quicReconnectFunc
This commit is contained in:
parent
7481a859b6
commit
536fa24595
1 changed files with 3 additions and 1 deletions
|
|
@ -189,7 +189,9 @@ func (c *Client) openStreamWithReconnect() (quic.Connection, quic.Stream, error)
|
|||
// Temporary error, just return
|
||||
return nil, nil, err
|
||||
}
|
||||
c.quicReconnectFunc(err)
|
||||
if c.quicReconnectFunc != nil {
|
||||
c.quicReconnectFunc(err)
|
||||
}
|
||||
// Permanent error, need to reconnect
|
||||
if err := c.connect(); err != nil {
|
||||
// Still error, oops
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue