diff options
author | Linus Nordberg <linus@nordberg.se> | 2019-12-04 10:12:23 +0100 |
---|---|---|
committer | Thomas Gschwantner <tharre3@gmail.com> | 2019-12-11 06:22:17 +0100 |
commit | fbecada8f8ef70c09605b61f23313fd5226e367f (patch) | |
tree | dd998afd4526374962e011523ec924454ba3a9b4 | |
parent | [tests] Add test cases for lease handling (diff) | |
download | wg-dynamic-fbecada8f8ef70c09605b61f23313fd5226e367f.tar.xz wg-dynamic-fbecada8f8ef70c09605b61f23313fd5226e367f.zip |
[tests] Stop reading from server on \n\n
The server no longer hangs up after sending its response, so stop
reading once it's finished writing its response.
Send stderr to /dev/null to mask the "write: Broken pipe" output.
-rwxr-xr-x | tests/clientsh.bash | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/clientsh.bash b/tests/clientsh.bash index 401a4a9..c65a107 100755 --- a/tests/clientsh.bash +++ b/tests/clientsh.bash @@ -108,8 +108,8 @@ send_cmd() { # It would have been nice to use /dev/tcp/fe80::%w0/970 instead of # nc, but we need to use a specific source port. eval $( - printf $REQ | nn -q $n ncat -p 970 fe80::%wg0 970 | - while read -r line; do + printf $REQ | nn -q $n ncat -p 970 fe80::%wg0 970 2>/dev/null | + while read -r line && [[ -n $line ]] ; do key="${line%%=*}" value="${line#*=}" case "$key" in |