mirror of
https://github.com/SagerNet/sing-shadowtls.git
synced 2025-04-01 19:27:36 +03:00
Fix client dial
This commit is contained in:
parent
dac782ca09
commit
78d8070aa6
1 changed files with 6 additions and 1 deletions
|
@ -66,7 +66,12 @@ func (c *Client) DialContext(ctx context.Context) (net.Conn, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return c.DialContextConn(ctx, conn)
|
||||
shadowTLSConn, err := c.DialContextConn(ctx, conn)
|
||||
if err != nil {
|
||||
conn.Close()
|
||||
return nil, err
|
||||
}
|
||||
return shadowTLSConn, nil
|
||||
}
|
||||
|
||||
func (c *Client) DialContextConn(ctx context.Context, conn net.Conn) (net.Conn, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue