Skip to content

Commit

Permalink
vsock: properly check gerr in Connect (thanks @vcabbage)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Layher <mdlayher@gmail.com>
  • Loading branch information
mdlayher committed Feb 12, 2022
1 parent 5615aad commit b60b2db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func (c *Conn) Connect(sa unix.Sockaddr) error {
// Subsequent calls: the runtime network poller indicates fd is
// writable. Check for errno.
errno, gerr := c.GetsockoptInt(unix.SOL_SOCKET, unix.SO_ERROR)
if err != nil {
if gerr != nil {
return gerr
}
if errno != 0 {
Expand Down

0 comments on commit b60b2db

Please sign in to comment.