mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 16:41:30 +00:00
Fix hysteria outbound
This commit is contained in:
parent
a7f77d59c1
commit
4f12eba944
|
@ -267,12 +267,14 @@ func (h *Hysteria) open(ctx context.Context, reconnect bool) (quic.Connection, q
|
||||||
if nErr, ok := err.(net.Error); ok && !nErr.Temporary() && reconnect {
|
if nErr, ok := err.(net.Error); ok && !nErr.Temporary() && reconnect {
|
||||||
return h.open(ctx, false)
|
return h.open(ctx, false)
|
||||||
}
|
}
|
||||||
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
stream, err := conn.OpenStream()
|
stream, err := conn.OpenStream()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if nErr, ok := err.(net.Error); ok && !nErr.Temporary() && reconnect {
|
if nErr, ok := err.(net.Error); ok && !nErr.Temporary() && reconnect {
|
||||||
return h.open(ctx, false)
|
return h.open(ctx, false)
|
||||||
}
|
}
|
||||||
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
return conn, &hysteria.StreamWrapper{Stream: stream}, nil
|
return conn, &hysteria.StreamWrapper{Stream: stream}, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue