Skip to content

Commit

Permalink
Fixes nc on macOS not closing socket when the stdin sends EOF
Browse files Browse the repository at this point in the history
Uses `-d` option that is supported both by BSD and GNU nc.

License: MIT
Signed-off-by: Jakub Sztandera <[email protected]>
  • Loading branch information
Kubuxu committed Dec 16, 2016
1 parent 9e8d108 commit 20665fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/sharness/t0235-cli-request.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ test_description="test http requests made by cli"
test_init_ipfs

test_expect_success "can make http request against nc server" '
go-sleep 0.5s | nc -l 5005 > nc_out &
nc -ld 5005 > nc_out &
NCPID=$!
go-sleep 0.5s && kill "$NCPID" &
ipfs cat /ipfs/Qmabcdef --api /ip4/127.0.0.1/tcp/5005 || true
'

Expand Down

0 comments on commit 20665fc

Please sign in to comment.