Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Revert: client.go: HybridVSockDialer: Check return size n of unix.Rec…
Browse files Browse the repository at this point in the history
…vfrom

This reverts commit c502552.

Revert changes as bring some instability to CI. After find
the root cause it will be merged again.

Fixes: #716

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
  • Loading branch information
jcvenegas committed Jan 24, 2020
1 parent 54eb918 commit 6cfb75d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions protocols/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ package client
import (
"context"
"fmt"
"io"
"net"
"net/url"
"strconv"
Expand Down Expand Up @@ -419,11 +418,8 @@ func HybridVSockDialer(sock string, timeout time.Duration) (net.Conn, error) {
return nil, err
}
eot := make([]byte, 1)
if n, _, err := unix.Recvfrom(int(file.Fd()), eot, syscall.MSG_PEEK); err != nil || n == 0 {
if _, _, err = unix.Recvfrom(int(file.Fd()), eot, syscall.MSG_PEEK); err != nil {
conn.Close()
if err == nil {
err = io.EOF
}
return nil, err
}
}
Expand Down

0 comments on commit 6cfb75d

Please sign in to comment.