fix: wireguard handle conn is nil
This commit is contained in:
parent
8b848b62bb
commit
dfc0ec995c
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 {
|
||||
return nil, err
|
||||
}
|
||||
if conn == nil {
|
||||
return nil, E.New("conn is nil")
|
||||
}
|
||||
return NewConn(&wgConn{conn, w}, w), nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue