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: Close dup fd after receive packet
Browse files Browse the repository at this point in the history
This reverts commit 33f3208.

Revert changes as bring some instability to CI. After found
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 7c2d8ab commit 54eb918
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions protocols/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,7 @@ func HybridVSockDialer(sock string, timeout time.Duration) (net.Conn, error) {
return nil, err
}
eot := make([]byte, 1)
n, _, err := unix.Recvfrom(int(file.Fd()), eot, syscall.MSG_PEEK)
file.Close()
if err != nil || n == 0 {
if n, _, err := unix.Recvfrom(int(file.Fd()), eot, syscall.MSG_PEEK); err != nil || n == 0 {
conn.Close()
if err == nil {
err = io.EOF
Expand Down

0 comments on commit 54eb918

Please sign in to comment.