Skip to content

Commit

Permalink
iproxy: Print correct error message when receiving fails
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias committed Oct 3, 2014
1 parent ddede75 commit e147062
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/iproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static void *run_stoc_loop(void *arg)
// try again
continue;
} else {
fprintf(stderr, "recv failed: %s\n", strerror(errno));
fprintf(stderr, "recv failed: %s\n", strerror(-recv_len));
break;
}
} else {
Expand Down Expand Up @@ -124,7 +124,7 @@ static void *run_ctos_loop(void *arg)
// try again
continue;
} else {
fprintf(stderr, "recv failed: %s\n", strerror(errno));
fprintf(stderr, "recv failed: %s\n", strerror(-recv_len));
break;
}
} else {
Expand Down

0 comments on commit e147062

Please sign in to comment.