fix: wireguard handle conn is nil
This commit is contained in:
parent
d57e07d611
commit
e9333f4586
1 changed files with 3 additions and 0 deletions
|
@ -216,6 +216,9 @@ func (w *WireGuard) DialContext(ctx context.Context, metadata *C.Metadata, opts
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if conn == nil {
|
||||||
|
return nil, E.New("conn is nil")
|
||||||
|
}
|
||||||
return NewConn(&wgConn{conn, w}, w), nil
|
return NewConn(&wgConn{conn, w}, w), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue