net: zperf: Fix invalid zsock_recv() error check
The return value can only be -1, errno value should be verified instead for the actual error code. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
a94209b098
commit
02530beeda
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ static inline int zperf_upload_fin(int sock,
|
|||
}
|
||||
|
||||
ret = zsock_recv(sock, stats, sizeof(stats), 0);
|
||||
if (ret == -EAGAIN) {
|
||||
if (ret < 0 && errno == EAGAIN) {
|
||||
NET_WARN("Stats receive timeout");
|
||||
} else if (ret < 0) {
|
||||
NET_ERR("Failed to receive packet (%d)", errno);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue